colttaylor
Programmer
Hi,
I'm trying to send a series of keystrokes into a dos application programmatically. My current technique involves running my dos application in a non-full-screen dos box and then loading the keystrokes into the clipboard. This is working properly such that when I click on the system menu of the dos box and select Edit/Paste, the keystrokes stream into my application just like I want them too.
Now I am trying to eliminate the need for manually clicking the system menu/edit/paste with the mouse.
I have posted a WM_Paste message to the handle of the dos box, but this doesn't do anything.
I think I need to post a WM_SystemMenu message followed by the WM_Keydown/WM_Keyup messages for the "E" and the "P", but when I just sen the WM_SystemMenu message, the system menu doesn't appear over the dos-box, so my confidence in this approach is low.
While I am coding the rest of this low-confidence attempt, I thought I might beg for help from the guru's of the WinAPI forum...
Anyone know how to do what I'm trying to do?
Thanks in advance!
Peace,
Colt. If it's stupid but it works, it isn't stupid
I'm trying to send a series of keystrokes into a dos application programmatically. My current technique involves running my dos application in a non-full-screen dos box and then loading the keystrokes into the clipboard. This is working properly such that when I click on the system menu of the dos box and select Edit/Paste, the keystrokes stream into my application just like I want them too.
Now I am trying to eliminate the need for manually clicking the system menu/edit/paste with the mouse.
I have posted a WM_Paste message to the handle of the dos box, but this doesn't do anything.
I think I need to post a WM_SystemMenu message followed by the WM_Keydown/WM_Keyup messages for the "E" and the "P", but when I just sen the WM_SystemMenu message, the system menu doesn't appear over the dos-box, so my confidence in this approach is low.
While I am coding the rest of this low-confidence attempt, I thought I might beg for help from the guru's of the WinAPI forum...
Anyone know how to do what I'm trying to do?
Thanks in advance!
Peace,
Colt. If it's stupid but it works, it isn't stupid