• 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: query if application is open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: query if application is open


  • Subject: Re: query if application is open
  • From: kai <email@hidden>
  • Date: Wed, 21 Feb 2007 23:13:38 +0000


On 21 Feb 2007, at 23:06, Michelle Steiner wrote:

On Feb 21, 2007, at 3:59 PM, Jacob Eggers wrote:

How do you check to see if an application is currently running? I wan to
check to see if iTunes is playing and am using

The following script will return true if iTunes is running

tell application "System Events"
	(application processes whose name is "iTunes") is not {}
end tell

As will an existence test:

tell application "System Events"
	application process "iTunes" exists
end tell

---
kai


_______________________________________________ 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/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: query if application is open
      • From: "Jacob Eggers" <email@hidden>
References: 
 >query if application is open (From: "Jacob Eggers" <email@hidden>)
 >Re: query if application is open (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: query if application is open
  • Next by Date: Re: Puzzling display dialog
  • Previous by thread: Re: query if application is open
  • Next by thread: Re: query if application is open
  • Index(es):
    • Date
    • Thread