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: julifos <email@hidden>
- Date: Mon, 15 Sep 2003 22:30:00 +0200
>
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
Also, as, if probably, you know the name of the app is allways the same, you
can simply:
######################
try
launch application "SETI@home_OSX"
end
######################
So, you will launch it if it is not already running, and also keep it in the
background.
And we can still compress a little Nigel's code:
######################
try
tell application "Finder" to if creator type of processes does not
contain "Seti" then open application file id "Seti"
end try
######################
So, we win 55 bytes, which we can spend on-the-fly:
######################
tell me to activate
display dialog "So fine!"
beep
beep
######################
;-)
jj
_______________________________________________
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.