• 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: Michelle Steiner <email@hidden>
  • Date: Sun, 9 Dec 2007 23:50:19 -0700

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Finding out whether an application is already active?
      • From: Clint Hoxie <email@hidden>
References: 
 >Finding out whether an application is already active? (From: Clint Hoxie <email@hidden>)

  • Prev by Date: app will not respond to library command
  • Next by Date: Re: Finding out whether an application is already active?
  • Previous by thread: Finding out whether an application is already active?
  • Next by thread: Re: Finding out whether an application is already active?
  • Index(es):
    • Date
    • Thread