Hello.
Where did you get/find that AppleEvent Manager?
It is interesting to know about that/such kind of events, and I believe that event to be the event that fires off the do shell script command, I bet delay and other commands have similiar events, and the fact that they arenât resolved, is because they are executed within the current AppleScript Environment. With the latter (Environment) I mean within the context of your running script. And since it then is within the context of your running script, it is internal, it is not reaching out for another independent process.
Edit
I donât care really if the delay command is in a Scripting Addition, and really fires off an external apple event, in this context, it was the closest to an internal command that I could think of when I wrote the post.
By the way, interesting algorithms for both resolving paths, and creating regexps for tearing them down in rfc3986.
And what I gather as the single most useful thing with the do shell script, is the âwith administrative privilegesâ, which is a huge boon when it comes to security, as it enables you to do whater admin task you need to do without switching account, or having your account set up as an administrator command.
While I am at the do shell script: I believe the commandline that is sent to the do shell script to be parsed, before that syso/exec event is sent.
And the do shell script âblocksâ until whatever is processing is finished, as long as the output of the do shell script is redirected to /dev/null or similiar. The reason for this, is that when the pty are set up and the commands are sent to sh, the pty part of it, realizes that there isnât any output to be waited for and returns. So, if you do this, and tells your command to execute in the background, then you have effectively created a thread of execution, that executes in parallell with your main script. Now, a maybe interesting little tidbit: if you are trying to create a new session in a an Os X terminal window, (maybe for interactive processing or what not), in order to set up a new controlling terminal for a process group, then you have to acquiere/use a pty, in order to get that new terminal, everything else is futile. That isnât documented anywhere, but my experience is that using a pseudo terminal isnât an optional step.