Joined: 27 Jul 2004
Location: Stockholm, Sweden
|Posted: Wed Apr 27, 2005 9:28 pm Post subject: Important: new method to check if an application is launched
|This tidbit is important for scripters wanting to make scripts for Salling Clicker that work great under Mac OS X 10.4 ("Tiger").
To check if an application is currently launched, my recommendation is to use a command available in Clicker's AppleScript dictionary:
tell application "SEC Helper"
set app_launched to (check application availability "name")
-- You can now use app_launched to check if the app is launched.
The "name" to use depends on the application you want to check of course. Use the name that is listed in Activity Viewer for the application in question.
The "old" method of doing the above involved checking the process list available from "System Events". I do not recommend using this method under 10.4. I won't go into detail until 10.4 has been officially released, but I wanted to give script developers a heads-up.
PS. The "check application availability" command is new in Clicker 2.2.1, so if you use it, your script won't work with Clicker 2.2, unless you take special precautions (wrap code in a try-statement, using the old method in the "on error" clause).