Reputation: 582
I want to send direct input to a (possibly) inactive window in python.
So far i have found a solution to send direct input via ctypes and i have a solution to simulate input to a window, which doesn't work with some games as the one i am testing with (GTA V) is using direct input, using postMessage()
via py32win.
So how would i now go about simulating those direct inputs while the target window is possibly not active? Is this even possible?
I would think it should be, because AutoHotkey for example can manage to send direct in such a case.
If you would like to experiment yourself i can provide the postMessage() version, otherwise i would like to keep the question code-free.
Upvotes: 2
Views: 2964
Reputation: 5774
As far as I can tell you cannot do this. A workaround (found at https://www.reddit.com/r/Python/comments/5wpxtt/automation_in_inactiveunfocused_window/) would be
Upvotes: 2