> So you want to do something without doing something for it? You can't stop the execution just when Entourage stops. The only thing you can do is make sure the applescript does not do anything when Entourage has stopped, which you can do by checking the "running" flag inside the applescript. That's it.
The OP doesn't say what his application is written in. If it's pure AppleScript then his only option is to check the 'running' property before sending commands, as you say, since AS will always automatically launch a non-running application before sending it a command. (Plus he's posting to the wrong list; pure AS discussion belongs on applescript-users.)
OTOH, if it's an Objective-C based app that calls into AppleScript for interacting with other applications, he could port the AS part to objc-appscript. Appscript provides greater control over application relaunching behaviour: by default, only run commands relaunch an application that quits part way through, though you can set it to never relaunch or always relaunch if you prefer. Of course, you still need to check any command results for errors (though you should be doing that anyway in ObjC), so it won't make his code any shorter
HTH
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden