Send wm_command to Ribbon menu

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Send wm_command to Ribbon menu

18 Oct 2017, 06:50

If I start to capture messages in MS Paint with ribbon menu in Win7 with Spy++ and click some menu buttons it does not show any wm_command messages.
But If I run this script I will get interesting results - MS Paint does not processes this messages, but press menu button.
You have to press F10 and when script pauses You can see that some menu button is pressed.
To continue - press F11.

Code: Select all

$F10::
Loop % 0xFFFFFFFF {
   SendMessage, 0x111, A_Index,,, ahk_class MSPaintApp
   if ErrorLevel {
      ToolTip % A_Index
      Pause
   }
}
$F11::Pause
For example to press magnifier in MS Paint we can do with this code:

Code: Select all

SendMessage, 0x111, 605,,, ahk_class MSPaintApp
The same behavior is with other Microsoft programs with ribbon menu.
Can Anybody explain - why this happens?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, mikeyww and 442 guests