Board index » cppbuilder » Q: Keystroke to console application
Chris K
![]() CBuilder Developer |
Chris K
![]() CBuilder Developer |
Q: Keystroke to console application2006-12-19 07:25:58 PM cppbuilder108 Hi, I need to send (simulate) key presses to a console apllication. I already have a pipe to that apllication for std-out reading and supposed I could use this for that purpose like: WriteFile(WritePipeHandle,"q",1,&bytesWritten,NULL); but this seems not to be the same as pressing the "q" character on the keyboard. Can someone help me out? Chris. |
Michel Leunen
![]() CBuilder Developer |
2006-12-20 03:21:26 AM
Re:Q: Keystroke to console application
Chris K wrote:
QuoteI need to send (simulate) key presses to a console apllication. -- ---------------------------------------- Michel Leunen mailto: see my homepage. C++Builder, BCC5.5.1 Web site: www.leunen.com/ ---------------------------------------- |
Chris K
![]() CBuilder Developer |
2006-12-21 06:47:45 AM
Re:Q: Keystroke to console applicationQuoteDid you try keybd_event()? window active first before using it. I know there are ways to do this if I have a handle to it but have to look it up. Thanks, Chris. "Michel Leunen" < XXXX@XXXXX.COM >schreef in bericht QuoteChris K wrote: {smallsort} |