I am new to Python and am trying to send a combination of key strokes to an application I open under Windows 7. While my script will work flawlessly when I invoke Notepad.ex
I know this was asked 6 years ago, but someone might be with the same problem, so here is a possible solution:
shell.AppActivate('Put_The_Name_Here')
The code above will select the program, file, etc that is opened but not activated, that, maybe, is your problem.
Hope this helps someone!
OK ... I rebooted the system and for some reason it is working now. I am wondering if some process instance from previous programme invocations might have been lingering on the system. Anyway, I am now able to perform the manipulations as expected, even if I don't really understand what went wrong in the first place.
Thanks to everyone who took the time to repsond.