Send command to running app?
How do I etc send a command to a running application?
Say I have "cmd" open, how do I make a function from my application to send etc: "cd .." to the cmd console?
Or a running game. I've gotten it to work but not the way I wanted it. The way I managed to do it, it starts the .exe file that its suppose to send the command to, on new... so there's two running windows...
Anyone has tips or solution for this?
Re: Send command to running app?
CD .. should be able to be sent using the "SendKeys" command
(it will send the specified keystrokes to whichever application is in focus)
If your running app is stoped at a data entry point then sendkeys will also send the keystrokes to the input field in focus (so long as the app is in focus)
Re: Send command to running app?
You could also try the keybd_event, or the newer SendInput() API's.