• 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: how to check whehter a application is active or not and the frontmost application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to check whehter a application is active or not and the frontmost application


  • Subject: Re: how to check whehter a application is active or not and the frontmost application
  • From: Brian Christmas <email@hidden>
  • Date: Mon, 25 Jan 2010 19:45:32 +1100


On 25/01/2010, at 6:44 PM, SHIVANK AGGARWAL, Noida wrote:

Please let me know how to find out that an application is active or not and how to find the front most application.
 
Thanks,
Shivank


G'day Shivank

Something like this in Applescript will do the job.

tell application "Finder"
set t to processes
repeat with x in t
if frontmost of x is true then display dialog name of x as text
end repeat
repeat with x in t
if name of x = "Mail" then display dialog "true"
end repeat
end tell


 Bear in mind that the process name is sometimes different to the actual program name. To get the name of the process of your application, open the app, and use...

tell application "Finder"
processes
end tell


Regards

Santa
 _______________________________________________
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: how to check whehter a application is active or not and the frontmost application
      • From: "SHIVANK AGGARWAL, Noida" <email@hidden>
References: 
 >how to check whehter a application is active or not and the frontmost application (From: "SHIVANK AGGARWAL, Noida" <email@hidden>)

  • Prev by Date: Re: Determining OS Version
  • Next by Date: Applescript and referring to a folder
  • Previous by thread: how to check whehter a application is active or not and the frontmost application
  • Next by thread: RE: how to check whehter a application is active or not and the frontmost application
  • Index(es):
    • Date
    • Thread