View Full Version : [QProcess] Can I simulate keyboard input to external program?
xkazielx
15th July 2009, 08:53
Hi guys, I'm trying to write a consol base app (under Win XP) that runs (starts) external program and then presses "Tab", "Tab", "Tab" follow by 4 digits then "Tab" and 8 digits. Is it possible to send data to QProcess in a similar to keyboard input way? Any hints on this?
nish
15th July 2009, 08:56
i dont think QProcess has that functionality... but you can always use WinAPI... if i remember correctly... its SendMessage or something..
xkazielx
15th July 2009, 23:19
So there is no other way then WinApi? Can I use some others Qt's features to do that?
If you have the sources of both apps under your control, you can of course use any IPC mechanism offered by Qt.
xkazielx
17th July 2009, 11:14
The problem is i don't have source code of application I want to comunicate with. I see taht I must resort to WinApi. Thanks for all your help folks.
AcerExtensa
17th July 2009, 12:17
use better PostMessage function it is asynchronous.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.