• 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: Check if app exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check if app exists


  • Subject: Re: Check if app exists
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 21 Sep 2007 18:58:59 -0500

While following this thread, it occurred to me that Jon Pugh's suggestion to use "exists application file id" seems to work flawlessly, prompts no "Where's application ..." dialog and has the advantage that it works even if the user has changed the name of the application. (It could happen!) I tried this ...

tell application "Finder"
	try
		exists application file id "com.apple.AddressBook"
	on error
		false
	end try
	set appExists to the result
	...
	...
end tell

... and encountered no problem. If I ask for a non-existent "comapple.farkle", it simply returns false.

On Sep 20, 2007, at 9:36 AM, Jeremy Matthews wrote:

I have the following basic code:

tell application "Finder"
		if application "GrowlHelperApp" exists then
			set growlexists to "true"
		end if
end tell

If the app DOESN'T exist...then it continually prompts you to find/ choose the application. Is there a way to gain silent approval or failure of this possibility without getting that prompt?

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Check if app exists (From: Jeremy Matthews <email@hidden>)

  • Prev by Date: Re: Scripting Excel: sample code?
  • Next by Date: Keystroking Terminal.app with case
  • Previous by thread: Re: Check if app exists
  • Next by thread: Re: Check if app exists
  • Index(es):
    • Date
    • Thread