Re: kAXShownMenuUIElement?
Re: kAXShownMenuUIElement?
- Subject: Re: kAXShownMenuUIElement?
- From: John Louch <email@hidden>
- Date: Mon, 24 Apr 2006 15:57:00 -0700
This is a bug in your script. perform action is async, so you are
asking for the attribute before the menu action has actually taken
place.
jl
On Apr 24, 2006, at 3:30 PM, Bill Cheeseman wrote:
on 2006-04-24 11:24 AM, John Louch at email@hidden wrote:
Try it on something like the Dock. It should have the AXMenu for the
AXShowMenu action.
How does the kAXShownMenuUIElement attribute work?
I'm seeing it as an attribute of the Finder's AXFinderItem, but
it's always
NULL -- even when I bring up a contextual menu on the finder item.
The dock is a little better, but not much. I can't read the value of
this
attribute using UI Browser or Accessibility Inspector, because the
menu
disappears or the mouse has to be held over the wrong element.
So I resort to GUI Scripting (which sometimes has problems of its
own). Here
are the results of running a Dock script and a Finder script. The
menus open
as expected, and they stay open while I get the AXShownMenuUIElement
attribute. The problem is in the 'value' property returned by the
AXShownMenuUIElement attribute, as you'll see:
activate application "Dock"
tell application "System Events"
tell process "Dock"
tell UI element "Finder" of list 1
perform action "AXShowMenu"
return properties of attribute "AXShownMenuUIElement"
end tell
end tell
end tell
--> {settable:false, name:"AXShownMenuUIElement", class:attribute,
value:{application "System Events"}}
activate application "Finder"
tell application "System Events"
tell process "Finder"
tell UI element "Movies" of list 1 of scroll area 1 ¬
of splitter group 1 of window 1
perform action "AXShowMenu"
delay 1 -- this is necessary
return properties of attribute "AXShownMenuUIElement"
end tell
end tell
end tell
--> {settable:false, name:"AXShownMenuUIElement", class:attribute,
value:missing value}
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (Accessibility-
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden