Re: Menu bug?
Re: Menu bug?
- Subject: Re: Menu bug?
- From: John Comiskey <email@hidden>
- Date: Tue, 18 Mar 2003 12:28:54 -0800
On Sunday, March 16, 2003, at 12:25PM, Bill Cheeseman wrote:
on 03-03-15 2:39 PM, Bill Cheeseman at email@hidden wrote:
I now have a working workaround that substitutes the menu for the
menu item
whenever I get the path based on GetElementAtPoint from a submenu or
a menu.
That's the reverse of what you're describing as the ideal.
My decision to ignore the top-level menu item in the menu bar until
this bug
is fixed turns out to be consistent with the current implementation of
GUI
Scripting. This command works:
click menu item 1 of menu 3 of menu bar 1 of application "<name>"
This does not:
click menu item 1 of menu 3 of menu item 3 of menu bar 1 of
application
"<name>"
Of course, GUI Scripting only works this way because it takes the value
given to it by AXChildren. If you fix AXChildren in time for the final
release of GUI Scripting, all bets are off.
Whatever the merits of the accessibility API's being fixed so as to
faithfully read all duplicate menus and menu items in the menu
hierarchy, I
would hope that GUI Scripting would compress them into a single item
at each
level of the menu hierarchy, because that's the way real-world
scripters
tend to think of them. Something like this:
click menu item 1 of menu item 2 of menu 3 of menu bar 1 of
application
"<name>"
Per the previous e-mail, I chose not to squeeze out the intervening
level, in part because the names are not always the same. Another
reason was that I didn't know, and still don't, if that intervening
object serves some useful purpose. Finally, a "read it and weep"
policy across the board is usually defensible, whereas spurious
exceptions invite a flood of special case requests.
The purpose of UI element scripting is to make things possible, not
necessarily easy.
JGC
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Never despair; but if you do, work on in despair. -- Edmund Burke
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.