Thanks. I think I found another way:
on run
tell application "System Events"
if name of processes contains "iTunes" then
tell application "iTunes"
-- do iTunes stuff
end tell
end if
end tell
end run
On Apr 30, 2005, at 2:32 PM, Dan Berghult wrote:
Is there a way in Applescript to find out if an application (such as
iTunes) is running?
Here's one way to do it: (This was done in Mac OS 9 but should work
in X as well)
tell application "Finder"
copy (name of every process whose name is "iTunes") to vName
if vName = {} then
return "Not running"
else
return "Running"
end if
end tell
Dan
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
------------------------------------------------------------
Paul Dobbs
dobbsp at charter dot net
pauldobbs at mac dot com
http://webpages.charter.net/dobbsp
------------------------------------------------------------
Intel has announced its newest chip: the Repentium!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|