--- In [email protected], Alan Martin <[EMAIL PROTECTED]> wrote: > Hi Sean > > The story so far... > > Luciano Cane asked: > > is there a workaround to check a item menu if is checked/unchecked? > > Sean wrote: > > Use Win.SendMessage() with an appropriate button's handle hButton: > > local ret=Win.SendMessage(hButton,240,0,0) > > ret is 0, 1, 2 for unchecked, checked, gray-checked respectively. > > Karen asked: > > This looks interesting, but how would you get a button's handle? > > Sean wrote: > > There are various ways: > > Win.Handle("cl","Button_Menu_Text") > > Win.Childhandlelist("cl","c=button") with word() ftn > > Win.HandleFromId() > > Win.HandleFromIndex() > > -------------------------------------------------- > > Do individual menu items really have individual handles? > > Maybe Win.SendMessage(zButtonHandle,240,0,0) > only works for checkboxes in dialogs, not for checkable menu items? > > I tested all your suggestions, > in various apps which have checked menu items. > > For all child handles, and for all child indexes, > Win.SendMessage(zButtonHandle,240,0,0) always returns 0 > and the Child text never equals any menu item's label.
Hi Alan, Longtime no see. I wasn't sure what he meant by item menu, so I just assumed he meant check-boxes, i.e., buttons, as they are pretty static unlike (dynamic) menu. I think there is also a way to check a checkable menu items, utilizing GetMenuState API via mighty dll plugin, although I haven't tested. In case of menu items, I'd better resort to the configurations in registry or ini files, as trying to keep menus open while checking the items is rather cumbersome. Sean ------------------------ Yahoo! Groups Sponsor --------------------~--> Get to your groups with one click. Know instantly when new email arrives http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/JV_rlB/TM --------------------------------------------------------------------~-> Attention: PowerPro's Web site has moved: http://www.ppro.org Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/power-pro/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
