• 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 20:20:10 +1100


On 25/01/2010, at 8:12 PM, SHIVANK AGGARWAL, Noida wrote:

Thanks Brian..
But I also want to know how to know which application exists.



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


Shivank, the script above will tell you if an application is running. Do you mean you want to tell if an Application actually exists on your disk without running it?

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

References: 
 >how to check whehter a application is active or not and the frontmost application (From: "SHIVANK AGGARWAL, Noida" <email@hidden>)
 >Re: how to check whehter a application is active or not and the frontmost application (From: Brian Christmas <email@hidden>)
 >RE: how to check whehter a application is active or not and the frontmost application (From: "SHIVANK AGGARWAL, Noida" <email@hidden>)

  • Prev by Date: RE: how to check whehter a application is active or not and the frontmost application
  • Next by Date: Mac Magic Mouse prefs and specific applications
  • Previous by thread: RE: how to check whehter a application is active or not and the frontmost application
  • Next by thread: Applescript and referring to a folder
  • Index(es):
    • Date
    • Thread