Alternatively, if you have a window of interest, you can hook that window 
object's OnMenuSelection event.

Aaron

-- 
Aaron Smith 
Web Development * App Development * Product Support Specialist
Ai Squared * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * www.aisquared.com

To insure that you receive proper support, please include all past 
correspondence (where applicable), and any relevant information pertinent to 
your situation when submitting a problem report to the Ai Squared Technical 
Support Team.

> -----Original Message-----
> From: Scripting [mailto:scripting-
> [email protected]] On Behalf Of
> Steve Clower via Scripting
> Sent: Monday, March 23, 2015 12:15 PM
> To: Rick Thomas; Window-Eyes Scripting List
> Subject: Re: MenuItem Selection
> 
> Rick,
> 
> Hook MSAA.OnObjectFocus, and check if your Accessible object's role is
> role_SYSTEM_MENUITEM. If it is, then that's your most recently focused
> menu item.
> 
> Regards,
> Steve
> 
> 
> On 3/23/2015 12:10 PM, Rick Thomas via Scripting wrote:
> > Hi: Anyone know a nice way to tell which MenuItem is selected?
> >
> > In Visual Studio I can select a MenuItem by arrowing down the list and
> > hitting enter or by typing the hot key, "I" in the case of the ErrorList.
> >
> > I have a couple of ideas but they seem sort of clumbsy if there is a
> > Best Practices WE ObjectModel way of doing this.
> >
> > I am guessing someone has worked with menus and found a solid
> > methodology.Do you use the keyboard events, the window events or
> what?
> >
> > Rick USA
> >
> >
> >
> > -------------- next part -------------- An HTML attachment was
> > scrubbed...
> > URL:
> > <http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/at
> > tachments/20150323/0e10afc3/attachment.htm>
> > _______________________________________________
> > Any views or opinions presented in this email are solely those of the author
> and do not necessarily represent those of Ai Squared.
> >
> > For membership options, visit http://lists.window-
> eyes.com/options.cgi/scripting-window-
> eyes.com/sclower%40aisquared.com.
> > For subscription options, visit
> > http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
> > List archives can be found at
> > http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com
> >
> 
> _______________________________________________
> Any views or opinions presented in this email are solely those of the author
> and do not necessarily represent those of Ai Squared.
> 
> For membership options, visit http://lists.window-
> eyes.com/options.cgi/scripting-window-
> eyes.com/asmith%40aisquared.com.
> For subscription options, visit http://lists.window-
> eyes.com/listinfo.cgi/scripting-window-eyes.com
> List archives can be found at http://lists.window-
> eyes.com/private.cgi/scripting-window-eyes.com


_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com

Reply via email to