Skip to content

robws/wm_commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WM_Command SendMessage constants for popular applications

By extracting the menu resources from EXE and DLL files, you can often discover the constant to automate those functions yourself in a language like Autohotkey via SendMessage/PostMessage.

.rc files are text and resemble the following (taken from Process Monitor):

CONTEXT_PROCESSTREE MENU
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
    POPUP "Context Menu"
        {
        MENUITEM "&Go To Event", 1058
        MENUITEM "&Add process to Include filter", 40143
        MENUITEM "Add process and &children to Include filter", 40145
        }
}

To initiate the &Add process to Include filter command in Autohotkey, you might do the following:

#Y::
    menu_constant=40143
    SendMessage, 0x111, menu_constant, 0,, A
Return

This uses the Windows+Y key combination to send the command to the active window, which in this case would be Process Monitor.

About

Wm_Command SendMessage constants for popular Windows programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published