Answer the question
In order to leave comments, you need to log in
Game on Unity partially ignores messages via winapi, is it possible to fix it?
In general, I'm trying to automate some processes in the game by sending system messages to the window. Now I use ahk, but I tried from python with the same result. Messages for closing the window, pressing keyboard keys are processed perfectly and without problems, but when it comes to mouse clicks at given coordinates, for some reason, the click occurs with the current cursor coordinates.
Code example
x = 920
y = 110
lParam := x & 0xFFFF | (y & 0xFFFF) << 16
PostMessage, 0x200, , %lParam%,, ahk_exe game.exe ;WM_MOUSEMOVE
PostMessage, 0x201, 0x4 | 0x1, %lParam%,, ahk_exe game.exe ;WM_LBUTTONDOWN нажимаем шифт+лкм
PostMessage, 0x202, 0x4, %lParam%,, ahk_exe game.exe ;WM_LBUTTONUP
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question