• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: summary: Weird feature of "if it exists" or?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Finding and deleting specific extensions.
  • Next by Date: Illustrator 10 Problem
  • Previous by thread: Re: summary: Weird feature of "if it exists" or?
  • Next by thread: Re: summary: Weird feature of "if it exists" or?
  • Index(es):
    • Date
    • Thread