Enable standard windows menu item in external program with AHK? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
oppa

Enable standard windows menu item in external program with AHK?  Topic is solved

23 Jul 2017, 11:44

I'm trying to enable a standard windows menu item in an external program with AHK,
A disabled menu item is signified by being greyed out, and you can't select it.
I need to make a menu item in an external program's menu (standard windows menu) go from being diabled (greyed out) to enabled (can select it).

It doesn't matter to me if the menu item actually works afterwards, I just need to make it enabled.

Is this possible?

Additional information if you're curious:
You can create AHK scripts for external programs that can use the programs built in menu, by modifying the menu .dll of that program (in resourcehacker or visual studio), adding your own "Custom" menu. The problem is, my program automatically disables all menu options and then does something in closed-source code to enable them individually. Obviously, my custom menu options don't actually do anything so they aren't enabled and I can't alter the closed-source program.

I can detect when my custom menu options are selected by monitoring the WM_COMMAND ID's for my target process and if it matches the unique ID's of my custom menu options, I can then run some function in my ahk background script that does something in the target process - effectively making it seem like a built in custom feature of that process. It also saves hassle of having to memorize a bunch of hotkeys, a visual menu is always better, and it doesn't have to be floating or something in an overlay or other tacky method.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gongnl, Google [Bot], mikeyww and 155 guests