Re: Missing value
Re: Missing value
- Subject: Re: Missing value
- From: Robert Poland <email@hidden>
- Date: Mon, 29 Aug 2011 10:13:39 -0600
Thanks Nigel,
That works on all the apps that I tried it on.
Makes me wonder if or when the GUI will fade away.
On Aug 29, 2011, at 5:55 AM, Nigel Garvey wrote:
> Robert Poland wrote on Sun, 28 Aug 2011 21:16:52 -0600:
>
>> Chris,
>>
>> This seems to work too.
>>
>> tell application "System Events" to set applicationName to item 1 of
> (get
>> name of processes whose frontmost is true)
>
> More directly:
>
> tell application "System Events" to set applicationName to name of first process whose frontmost is true
>
> It famously gives the wrong result for FireFox, though.
>
> If you know your frontmost application is visible, I'm wondering if this
> has any merit:
>
> tell application "System Events" to set applicationName to name of menu bar item 2 of menu bar 1 of (first process whose frontmost is true)
>
>
> NG
>
> _______________________________________________
> 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
Robert Poland - Fort Collins, CO
_______________________________________________
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