• 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: "SHIVANK AGGARWAL, Noida" <email@hidden>
  • Date: Mon, 25 Jan 2010 14:42:55 +0530
  • Acceptlanguage: en-US
  • Thread-topic: how to check whehter a application is active or not and the frontmost application

Thanks Brian..

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

 

From: applescript-users-bounces+shivank.aggarwal=email@hidden [mailto:applescript-users-bounces+shivank.aggarwal=email@hidden] On Behalf Of Brian Christmas
Sent: Monday, January 25, 2010 2:16 PM
To: applescript-users-request
Subject: Re: how to check whehter a application is active or not and the frontmost application

 

 

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

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
 _______________________________________________
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: Brian Christmas <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>)

  • Prev by Date: Applescript and referring to a folder
  • Next by Date: Re: how to check whehter a application is active or not and the frontmost application
  • Previous by thread: Re: 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