Send keystrokes to a windows that is running in background

Ask gaming related questions (AHK v1.1 and older)
33more
Posts: 1
Joined: 06 Apr 2020, 17:16

Send keystrokes to a windows that is running in background

Post by 33more » 20 Jun 2021, 17:16

Say for example I have a window/game opened, but in background. I basically start the game, then hit ALT+TAB to switch to a web browser, but I want to send every 30 seconds a combination of keystrokes, so I'm not detected as idling. That would be considering that the game doesn't check first that the "window" is not foreground which I will presume is not checked.

Is this possible? Is there any script already working?

Rohwedder
Posts: 7558
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Send keystrokes to a windows that is running in background

Post by Rohwedder » 21 Jun 2021, 03:26

Hallo,
sending keyboard input to a window running in the background is possible with ControlSend.
If your game accepts these simulated keystrokes you have to try it out.
https://www.autohotkey.com/docs/commands/ControlSend.htm

Post Reply

Return to “Gaming Help (v1)”