I'd like to use a script to send events such as keyboard or mouse input to automate another program. Think a bot that plays a game for instance (although I don't play video-games).
I want to do this with several (script, program) pairs at the same time.
I known I can automate my mouse and keyboard on windows using autoit or the win32 API, but windows has the concept of "active windows": there is only one active window at a time, and this is the windows that can receive input.
Because of this "active window" concept, I can't automate multiple programs at once.
What alternative do I have?
EDIT: I need to automate the programs without having to wait for another program. Switching the active window using keyboard shortcuts won't do it. Also I want to use the computer while the programs are automated in background.