• 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: Weird feature of "if it exists" or?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird feature of "if it exists" or?


  • Subject: Re: Weird feature of "if it exists" or?
  • From: Robert Poland <email@hidden>
  • Date: Mon, 15 Sep 2003 10:13:50 -0600

At 4:13 PM -0600 14/09/03, Robert Poland wrote:
set x to file ID of application "SETI@home_OSX" gets error "...Can't get last file.

Sorry Bob, but that's not enough yet.

This line errors on my machine, too, for a running application, both in a "tell Finder" wrapper or not:

------------------------
tell application "Finder" to set x to file id of application "Smile"
--> error
------------------------

------------------------
set x to file id of application "Smile"
--> error
------------------------

Please do run the following on a machine where SETI@home_OSX is currently running:

------------------------
tell application "Finder" to get creator type of process "SETI@home_OSX"
------------------------

Emmanuel

You're right, it still won't run.
------------------------
tell application "Finder" to get creator type of process "SETI@home_OSX"
------------------------
doesn't seem to be the cure for the main problem.
There are a number of ways to see if the app is running, but I need a way to see if the app exists without causing a search for the app.

Nigel Garvey <email@hidden> came up with this which seems to work. Not mentioning the app by name seems to be the cure.

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
--
_______________________________________________
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.

  • Follow-Ups:
    • Re: Weird feature of "if it exists" or?
      • From: Paul Berkowitz <email@hidden>
References: 
 >Weird feature of "if it exists" or? (From: Robert Poland <email@hidden>)
 >Re: Weird feature of "if it exists" or? (From: Emmanuel <email@hidden>)

  • Prev by Date: August 2003 gcc Updater available
  • Next by Date: Re: Weird feature of "if it exists" or?
  • Previous by thread: Re: Weird feature of "if it exists" or?
  • Next by thread: Re: Weird feature of "if it exists" or?
  • Index(es):
    • Date
    • Thread