Results 1 to 1 of 1

Thread: Accessing keyboard input in child process

  1. #1
    Join Date
    Jan 2008
    Posts
    31
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Accessing keyboard input in child process

    This is a first post from an absolute newbie so sorry if it's really a trivial question.

    I support a group of volunteer senior citizens who have limited computer skills and seldom back up their work. I want to build an app to send a few bytes to a child app as if the user had hit the F2 key. Child app is a Windows program that I have no control over.

    I launch the child from a simple widget using

    Qt Code:
    1. process.setWorkingDirectory(...);
    2. process.start( ....);
    To copy to clipboard, switch view to plain text mode 

    and then

    Qt Code:
    1. QTimer::singleShot( 120000, this, SLOT(sendText()));
    2.  
    3. void myApp::sendText()
    4. {
    5. if( process.state() == 2)
    6. {
    7.  
    8. }
    To copy to clipboard, switch view to plain text mode 

    Child app gets stated ok. Problem is how to send the bytes. I've tried putChar and write() but nothing seems to get to the child process, which has keyboard focus as user is entering data.
    Last edited by jpn; 22nd January 2008 at 21:54. Reason: missing [code] tags

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.