philrosenberg
Technical User
I'm writing a program that needs to run a number of DOS programs and send keyboard input to them.
I'm currently using CreateProcess() to open the applications and keybd_event() to generate the input. However this seems a very inelegant way to do this, especially as it seems that the application I want to receive the keystrokes has to have the focus. Is there any better way to send the keyboard input, perhaps generating a WM_KEYDOWN message using PostThreadMessage()?
Thanks for any help
Phil
I'm currently using CreateProcess() to open the applications and keybd_event() to generate the input. However this seems a very inelegant way to do this, especially as it seems that the application I want to receive the keystrokes has to have the focus. Is there any better way to send the keyboard input, perhaps generating a WM_KEYDOWN message using PostThreadMessage()?
Thanks for any help
Phil