• 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: Detecting Applescript and SKYPE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting Applescript and SKYPE


  • Subject: Re: Detecting Applescript and SKYPE
  • From: Deivy Marck Petrescu <email@hidden>
  • Date: Fri, 10 Oct 2008 14:59:48 -0400


On Oct 10, 2008, at 2:33 PM, Luther Fuller wrote:

On Oct 10, 2008, at 9:30 AM, Don Wieland wrote:
In the same vain, I like to detect if SKYPE is installed a machine.

The discussion got me to thinking that there's another way to detect an application.
But I can't remember. So I did a little experimenting and came up with this ...


	tell application "Finder"
		exists application file id "com.skype.skype"
	end tell

If Skype is installed, this script returns 'true'. And your probably thinking that it will return 'false' if it's not there. Wrong! It errors. So, the script becomes ...

	tell application "Finder"
		try
			exists application file id "com.skype.skype"
		on error
			false
		end try
	end tell

And if you are wondering where "com.skype.skype" came from ...
It's the application's 'Bundle identifier'.

To see an application's bundle identifier, open the package's "Info.plist" file in the "Contents" folder with "Property List Editor". The bundle identifier will be shown as 'Bundle identifier' (or as 'CFBundleIdentifier', if you have Show Raw Keys turned on.)



To make it even shorter:

try
get id of app "Skype"
on error
display dialog "Skype is not installed" giving up after 20
end



Deivy Petrescu
email@hidden



_______________________________________________
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
  • Follow-Ups:
    • Re: Detecting Applescript and SKYPE
      • From: Michelle Steiner <email@hidden>
References: 
 >Detecting Applescript and SKYPE (From: Don Wieland <email@hidden>)
 >Re: Detecting Applescript and SKYPE (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Detecting Applescript and SKYPE
  • Next by Date: Re: Detecting Applescript and SKYPE
  • Previous by thread: Re: Detecting Applescript and SKYPE
  • Next by thread: Re: Detecting Applescript and SKYPE
  • Index(es):
    • Date
    • Thread