• 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: Active Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Active Application


  • Subject: Re: Active Application
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 13 Mar 2003 21:06:29 -0800

On 3/13/03 8:16 PM, "Philippe GRUCHET" <email@hidden> wrote:

> From: Adam Goldstein <email@hidden>
>
>> I'm trying to get the name of the application whose name appears in
>> the menu bar.
>> Here are the things I've tried, with results:
>>
>> current application
>> Result: "current application"
>
> name of current application


>> frontmost application
>> Result: "frontmost application"
>
> tell app "System Events" to name of app process 1

No. 'process 1' is the first process to have launched, not the process in
the front.

And 'frontmost application' doesn't seem to resolve to anything useful,
neither app, nor as alias nor as string, in OS AppleScript 1.9.1. Instead,
try:

tell application "System Events" to name of first process whose
frontmost is true



--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Active Application
      • From: Jeffrey Mattox <email@hidden>
    • Re: Active Application
      • From: John Delacour <email@hidden>
References: 
 >Re: Active Application (From: Philippe GRUCHET <email@hidden>)

  • Prev by Date: Re: Math with AS (was: Code for a circle)
  • Next by Date: Re: scripting "Mail"
  • Previous by thread: Re: Active Application
  • Next by thread: Re: Active Application
  • Index(es):
    • Date
    • Thread