How to send keystrokes to an inactive window

20 views Asked by At

I'm doing the autopilot function in tanks. I am faced with the problem of entering the W key. What is the essence of the function, you press Q and your tank goes by itself, that is, with pressing Q, you clamp W. But if you go through another window, then W is released. I want to make it possible to press Q and go to another window , but the W key was pressed into the game and the tank was driving.

Sorry for my English, all questions to Yandex translator)

I tried to create both a third-party exe file that is not embedded in the game, and tried to use a dll library. in any case, when switching to another window, the W key is released postMessage but when postMessage is performed in the game window, the game freezes. I also tried using SendMessage, but the same thing

0

There are 0 answers