Hi,
I've seen some examples of using AppleScript iTerm extensions and I have the following problem: I'm able to activate a session in an iTerm terminal (checking if it already exists etc) and then I've used <write text "shell command to execute"> in AppleScript to launch a command within the terminal session; the command executes and I can see its output within the session. The problem is that I have a repeat cycle within my script that repeatedly execs the write text command within the session, and I can see that the command is printed in the iTerm session twice or more (one for each repeat loop) but it is executed only the first time. Maybe the problem is that I write the second command before the first command has been completed. So, I'd like to know if one of the two things can be done:
- how to execute multiple commands with multiple write text commands, without knowing if command N has been completed when I write the command N+1 and so on..
- ho to execute a command within the session (I need to see the output, so I'd like to use something like write text) and block the calling AppleScript until he command has been completed
If it's not clear enough, I'll try to post a piece of code next days (at present time I'm in a hurry, so I can't.
Thank you in advance for any help