send number to other application via shell object… strange behavior

Nov 8, 2010 at 12:29am

send number to other application via shell object… strange behavior

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 8, 2010 at 4:59pm

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 9, 2010 at 1:04am

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


You must be logged in to reply to this topic.