PDA

View Full Version : Send a key to process



Nyphel
8th July 2007, 15:34
Hi :)

I would like to send a key (for example "space") to a process that is currently running under Windows. This process should have started before my application, it isn't my application that would launch the process.

I've found a first solution using a Batch script (.bat) with the PowerBatch Toolkit. It allows me to hit keys (like "space"). If my application is running, and if it's window is the selected one, that works fine... But my goal is to have multiple windows opened, and multiple process to manage with my "send keys" application.

I didn't found any solution, has someone an idea or a hint ?

Thanks ;)

wysota
9th July 2007, 15:35
Under Windows you can post messages to a running application using ::postMessage()

Nyphel
9th July 2007, 17:37
Oh yes, that's exactly what I was searching for...