• 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: Finding out whether an application is already active?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding out whether an application is already active?


  • Subject: Re: Finding out whether an application is already active?
  • From: Clint Hoxie <email@hidden>
  • Date: Sun, 9 Dec 2007 23:55:52 -0700

Thank you.

Clint


On Dec 9, 2007, at 11:50 PM, Michelle Steiner wrote:

On Dec 9, 2007, at 11:25 PM, Clint Hoxie wrote:

What code do I use to determine if an app is already running? (...for the purposes of starting it if it isn't running, with a time delay before having the app in question do some other thing...)


Depends on which version of the OS you have.

In Leopard, you can do this:

application "Mail" is running

That will return true or false.

In earlier versions of OS X, use this code:

tell application "System Events"
	"Mail" is in name of application processes
end tell

It will also return true or false.

-- Michelle

--
We're given a choice in our lives, to make things better, or worse, or merely endure like Sheep. I choose to make things better, as much as I can.
-- Mercedes Lackey


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


This email sent to 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
References: 
 >Finding out whether an application is already active? (From: Clint Hoxie <email@hidden>)
 >Re: Finding out whether an application is already active? (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Finding out whether an application is already active?
  • Next by Date: Re: Changing the name of a file in the temporary items folder
  • Previous by thread: Re: Finding out whether an application is already active?
  • Next by thread: app will not respond to library command
  • Index(es):
    • Date
    • Thread