Hello all,
Did someone manage to simulate mouse clicks in Wow with PostMessage ? (I need background mode).
Using Winspector or Spy++ I see that clicks happen in the right X Y place.
Here are the messages:
Real click:
WM_LBUTTONDOWN
Mouse coordinates: 695, 86
WM_LBUTTONDOWN
Buttons pressed: MK_LBUTTON
Mouse coordinates: 695, 86
WM_LBUTTONUP
wParam: 0x00000001
lParam: 0x005602b7
WM_LBUTTONUP
wParam: 0x00000000
lParam: 0x005602b7
False click:
WM_LBUTTONDOWN
Buttons pressed: MK_LBUTTON (this line was added)
Mouse coordinates: 695, 86
WM_LBUTTONDOWN
Buttons pressed: MK_LBUTTON
Mouse coordinates: 695, 86
WM_LBUTTONUP
wParam: 0x00000001
lParam: 0x005602b7
WM_LBUTTONUP
wParam: 0x00000001 (1 instead of 0)
lParam: 0x005602b7
I read that Wow detects false clicks and blocks them in the message queue, is that right ?
Apoc stated that WoW's MainWindowHandle is not the good one, and I need to send the move/click messages to the actual game window.
He suggested : Which requires you to enumerate over the windows for the WoW process. Use Spy++ to get the class name and parent of the draw window.
But well I did find only the GxWindowClass D3d handle.
By the way simulating keystrokes works (even though sending keydown and keyup will strangely press the key twice).
Thank you very much for your help !
Kind regards.