Re: how to check whehter a application is active or not and the frontmost application
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