Forums > MaxMSP

send number to other application via shell object… strange behavior

Nov 08 2010 | 12:29 am

Hi to all
I’m trying to send numbers to other application (like TextEdit) with the shell object and applescript.
It’s working: list of numbers in Max get "retyped" in TextEdit, but sometime (usually every 4 or 5 time) the order of those numbers it’s all wrong Ex. if I have in max 1 2 3 4 5 6 7 8, i get in TextEdit 1 2 4 3 5 6 8 7.
In the max window the numbers are always printed in the right order, so I’m thinking that something get delayed in the applescript.

— Pasted Max Patch, click to expand. —

(you need the shell object)

Do you have any advice?
thanks in advance


Nov 08 2010 | 4:59 pm

While I’m sure you may have your reasons for doing it like this, I recommend you build a parser that stores what you type and the performs actions in a proper loop. I recommend poly or at the very least store the i you are trying to send an only send it when the previous one has executed it’s shell script successfully.

Nov 09 2010 | 1:04 am

You are perfectly right! ☺ I didn’t patch the right output of the shell object (that bang after execution) to the next shell object… Too much patching late at night! ☺ now it works, I have to make it a little more efficient, as you say a loop is the best way to do do it. Have you any example of how can I use the poly as a parser?
Thank you

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > MaxMSP