It might be because a
WM_LBUTTONDOWN message is sent to your app and it is accepting a button click when the wParam contains the value 0x0001 (MK_LBUTTON), but it also contains either 0x0020 (MK_XBUTTON1) or 0x0040 (MK_XBUTTON2), so it doesn’t act because the parameter is 0x0021 or 0x0041. I didn’t look at the AHK source, but maybe when executing ControlClick, it checks the physical status of the other mouse buttons and sets the wParam accordingly when sending WM_LBUTTONDOWN.
In case something like that is happening, instead of ControlClick, you might try sending WM_LBUTTONDOWN yourself via
PostMessage with 0x0001as the wParam (and the click location as the lParam):
Code: Select all
PostMessage, 0x0201, 0x0001, (1002 << 16) | 1038,, App
If your window’s client area does not start at 0,0 in its window, then change the above coordinates to be relative to the client area.
I am guessing there will be no difference, but it’s worth a shot.