• 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: Luther Fuller <email@hidden>
  • Date: Sat, 11 Oct 2008 14:23:16 -0500

On Oct 10, 2008, at 8:04 PM, Sander Tekelenburg wrote:
You can get the displayed name directly:

displayed name of (application file id applIdent)

I forgot all about that silly thing. Thanks.

On second thought and after a good night's sleep, I realized that using the (displayed) name of an application is a bad idea. My isRunning handler will work correctly most of the time, but it's easy to fool. In other words, not idiot proof. (I'll spare you the details of my experiments.)

Here is a better handler ...

on isRunning(applIdent)
	tell application "System Events"
		try
			exists (some process whose bundle identifier is applIdent)
		on error
			return false
		end try
		return true
	end tell
end isRunning

If the process does not exist, there is a longer than usual delay, but not outrageous. The possible "bug" is that you should be able ask ...

	tell application "System Events" to exists process identifier applIdent

but you can't. I've tried.
_______________________________________________
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: 
 >Re: Detecting Applescript and SKYPE - MORE (From: Don Wieland <email@hidden>)
 >Re: Detecting Applescript and SKYPE - MORE (From: Luther Fuller <email@hidden>)
 >Re: Detecting Applescript and SKYPE (From: Sander Tekelenburg <email@hidden>)

  • Prev by Date: Re: SatImage regexp problem
  • Next by Date: Creating a new rule in Entourage2008
  • Previous by thread: Re: Detecting Applescript and SKYPE
  • Next by thread: Re: Detecting Applescript and SKYPE - MORE
  • Index(es):
    • Date
    • Thread