Menu, MenuName, New, OutputVarHMENU yielding the menu handle (HMENU)?
[AHK_L] Additional menu Cmd to retrieve HMENU
#1
Posted 30 June 2012 - 08:17 AM
#2
Posted 01 July 2012 - 04:19 AM
*resists temptation to post Beach Boys youtube video...
#3
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, OutputVarHMENU yielding the menu handle (HMENU).Hmmm, I was thinking about theAdding a "New" sub-command just so that you can get a HWND isn't very intuitive.
Gui, New sub-command when suggesting this. The New menu sub-command could act like the New GUI sub-command:Creates a new menu. Any existing menu with that name is destroyed. The menu handle (HMENU) is stored in OutputVarHMENU (P3).Since allIf you can come up with an appealing syntax for retrieving the HWND of a new or existing menu, I may implement it.
Menu commands only deal with the script's own menus, I don't see the need to get the HMENU of an existing menu. Both CreateMenu() and 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 Create.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?
#4
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.
[1] Neither have I; they're long before my time. I find the song annoying, after hearing the lottery ad version too many times.BTW: [1] From their start I've never been a fan of the "Beach Boys". [2] And, who has chosen the new color for Mods? Any dealings with the German Telekom?
[2] 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.




