krypto2000
asked on
Send key sequence to ms-dos prompt
Hello,
I want to send a key-sequence, "abcdef" for example, to the dos command prompt with the sendMessage function.
I can get the handle, no problem, but after i didn't know what is the WM_COMMAND to send text.
I've tried with WM_SETTEXT but that change the caption of the console...
That's all ;-)
Ā
I want to send a key-sequence, "abcdef" for example, to the dos command prompt with the sendMessage function.
I can get the handle, no problem, but after i didn't know what is the WM_COMMAND to send text.
I've tried with WM_SETTEXT but that change the caption of the console...
That's all ;-)
Ā
WM_KEYDOWN maybe...
would be my guess too
WM_KEYDOWN and WM_KEYUP combination
WM_KEYDOWN and WM_KEYUP combination
SendMessage(handle, WM_CHAR, $41, 0); // sends 'A' to a command prompt window (handle)
A more readable version is:
SendMessage(h, WM_CHAR, Ord('A'), 0);
SendMessage(h, WM_CHAR, Ord('A'), 0);
good point, geo ;-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks meikl. Lots of attempts for automating third-party softwares administration/supervision tasks recently seem to have an effect ;-)
ASKER
that's not realy hard but i have time not so much ;-)
thank you very much, the points is for you geobul !!
thank you very much, the points is for you geobul !!