Re: Finding the focused UI element
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