Results 1 to 3 of 3

Thread: Send a key to process

  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Send a key to process

    Hi

    I would like to send a key (for example "space") to a process that is currently running under Windows. This process should have started before my application, it isn't my application that would launch the process.

    I've found a first solution using a Batch script (.bat) with the PowerBatch Toolkit. It allows me to hit keys (like "space"). If my application is running, and if it's window is the selected one, that works fine... But my goal is to have multiple windows opened, and multiple process to manage with my "send keys" application.

    I didn't found any solution, has someone an idea or a hint ?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Send a key to process

    Under Windows you can post messages to a running application using ::postMessage()

  3. The following user says thank you to wysota for this useful post:

    Nyphel (9th July 2007)

  4. #3
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Send a key to process

    Oh yes, that's exactly what I was searching for...

Similar Threads

  1. problems starting process
    By parsito in forum Qt Programming
    Replies: 8
    Last Post: 11th May 2007, 21:32
  2. My client can't send data
    By hiuao in forum Qt Programming
    Replies: 10
    Last Post: 23rd February 2007, 09:32
  3. Manually send signal to slot
    By donmorr in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2006, 15:03
  4. Replies: 2
    Last Post: 26th April 2006, 10:43
  5. How to activate another process?
    By gtthang in forum Qt Programming
    Replies: 6
    Last Post: 3rd February 2006, 07:53

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.