Reputation: 100
I would like to send DirectInput keys to an inactive window without interfering with my actual mouse. I tried using PostMessage, SendInput and SendMessage but pywin32 uses virtual keycodes while ctypes does work with DirectInput. I have no idea how I can make it send in an inactive window.
Upvotes: 3
Views: 1329
Reputation: 94
Try using this, it manages to work for me send the keystrokes to the inactive window,
Use (but add error checking) hwndMain = win32gui.FindWindow("notepad", "prueba.txt: log keys") hwndEdit = win32gui.FindWindowEx
Upvotes: -1