Menu, MenuName, New, OutputVarHMENUyielding the menu handle (HMENU)?
[AHK_L] Additional menu Cmd to retrieve HMENU
Posted 30 June 2012 - 08:17 AM
Posted 01 July 2012 - 04:19 AM
*resists temptation to post Beach Boys youtube video...
Posted 01 July 2012 - 07:58 AM
Well, the English language still has some secrets for me. I just tried to ask politely. As a second try:
"Wouldn't it be nice" is a phrase to avoid in the Suggestions forum if you want me to actually implement something.
..., I suggest to implement a command like
Menu, MenuName, New, OutputVarHMENUyielding the menu handle (HMENU).
Hmmm, I was thinking about the
Adding a "New" sub-command just so that you can get a HWND isn't very intuitive.
Gui, Newsub-command when suggesting this. The
Newmenu sub-command could act like the
NewGUI sub-command:Creates a new menu. Any existing menu with that name is destroyed. The menu handle (HMENU) is stored in OutputVarHMENU (P3).
If you can come up with an appealing syntax for retrieving the HWND of a new or existing menu, I may implement it.
Menucommands only deal with the script's own menus, I don't see the need to get the HMENU of an existing menu. Both
CreatePopupMenu()API-functions don't have parameters and return the HMENU. I assume it won't be changed afterwards. So it may be more intuitive to call the new sub-command
BTW: From their start I've never been a fan of the "Beach Boys". And, who has chosen the new color for Mods? Any dealings with the German Telekom?
Posted 01 July 2012 - 12:39 PM
Excluding this "hwndOutputVar", a "New" command doesn't seem to have much value. Gui New was created primarily so that library functions could create a GUI without reserving a name or number. There seems to be less need for this with menus. Additionally, since the Menu command doesn't combine the name with the sub-command the way the Gui command does, creating an anonymous menu would be kind of awkward. Compare:
Gui New, hwndVar Menu,, New, hwndVarLastly, there is no concept of a "default" menu, so you would need to specify %Var% for each menu command thereafter.
Your English is fine, and you're free to ignore my gripe. Whether true or not, the immediate impression I get whenever I see that phrase is that the person writing it didn't think their idea through and consider whether it is actually useful or worthwhile.
Well, the English language still has some secrets for me.
 Neither have I; they're long before my time. I find the song annoying, after hearing the lottery ad version too many times.
BTW:  From their start I've never been a fan of the "Beach Boys".  And, who has chosen the new color for Mods? Any dealings with the German Telekom?
 I persume it was polyethene, because I can't imagine who else would have made any change to the site, and because he was online when I noticed the change happen.