Frank Günther wrote: > Hi All, > > I've automated a console application using win32pipe.popen2 by capturing the > output stream and writing the input stream. So far it works fine but the > console application uses Kbhit() from conio.h in some cases. Is there a > possibility to fill the keyboard buffer and emulate a keystroke for the > process opened by win32pipe? > Win32api.SendMessage can't be used because there is no window for the > console application. The user keystrokes are captured by my wx-application > that automates the console application but I don't know how to forward the > keystroke to Kbhit. > > Ciao, > Frank
You should be able to use PyConsoleScreenBuffer.WriteConsoleInput to send keystrokes to the app. The tricky part will be getting a handle to the console for the child process. Roger _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32