• 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: Finding the focused UI element
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the focused UI element


  • Subject: Re: Finding the focused UI element
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 17 Jul 2008 13:57:26 -0400
  • Thread-topic: Finding the focused UI element

on 2008-07-17 1:11 PM, Arjen Baarsma at email@hidden wrote:

> if ("AXShowMenu" is in name of actions of theControl) then -- if
> theControl has a menu, show it
> perform action "AXShowMenu" of theControl

Very good. I forgot about AXShowMenu.

So, using the TextEdit target test in my previous message, this is very
fast:

activate application "TextEdit"
tell application "System Events"
    tell (first application process whose frontmost is true)
        get value of attribute "AXFocusedUIElement"
        perform action "AXShowMenu" of result
    end tell
end tell

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com

PreFab Software - www.prefabsoftware.com


 _______________________________________________
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: Finding the focused UI element
      • From: Arjen Baarsma <email@hidden>
References: 
 >Re: Finding the focused UI element (From: Arjen Baarsma <email@hidden>)

  • Prev by Date: Re: Finding the focused UI element
  • Next by Date: Simple Display Dialog confusion
  • Previous by thread: Re: Finding the focused UI element
  • Next by thread: Re: Finding the focused UI element
  • Index(es):
    • Date
    • Thread