Is it possible to create an AFK bot that only sends input to one window? The idea is that this would allow you to use your PC normally, but your game character would move around with, for example, presses of the "w, a ,s ,d" keys.
I've tried a lot of different things, and ended up coding the following script in Python:
import pyautogui
import time
window_name = "Rechner"
delay = 5
message = "1"
pyautogui.hotkey('winleft', '1')
time.sleep(delay)
# Type the message
pyautogui.typewrite(message, interval=1)
pyautogui.press('enter')
but it didn't work.