FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Important: new method to check if an application is launched

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Wed Apr 27, 2005 9:28 pm    Post subject: Important: new method to check if an application is launched Reply with quote

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:

[code:1]
tell application "SEC Helper"
set app_launched to (check application availability "name")
end tell
-- You can now use app_launched to check if the app is launched.
[/code:1]

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.

Best.
--
Jonas

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).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group