Re: summary: Weird feature of "if it exists" or?
Re: summary: Weird feature of "if it exists" or?
- Subject: Re: summary: Weird feature of "if it exists" or?
- From: Nigel Garvey <email@hidden>
- Date: Mon, 15 Sep 2003 14:54:25 +0100
Robert Poland wrote on Sun, 14 Sep 2003 22:16:42 -0600:
>
Thanks to julifos <email@hidden> the script works.
>
>
try -- if not installed, don't error
>
tell application "Finder" to get application file id "Seti"
>
--> is the app already running?
>
tell application "Finder" to name of processes contains "SETI@home_OSX"
>
--> this returns true or false
>
if (result) then --> app is running
>
--> do whatever here... end script?
>
else --> app is not running
>
--> launch it
>
end if
>
on error -- "SETI@home_OSX" doesn't exist
>
return
>
end try
You should be able to reduce that to this:
tell application "Finder"
if not ((some process whose creator type is "Seti") exists) then
if application file id "Seti" exists then open application file id
"Seti"
end if
end tell
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.