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

Re: Missing value


  • Subject: Re: Missing value
  • From: Nigel Garvey <email@hidden>
  • Date: Mon, 29 Aug 2011 12:55:03 +0100

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

  • Follow-Ups:
    • Re: Missing value
      • From: Robert Poland <email@hidden>
  • Prev by Date: Re: posix path error
  • Next by Date: Re: Missing value
  • Previous by thread: Re: Missing value
  • Next by thread: Re: Missing value
  • Index(es):
    • Date
    • Thread