Keyboard Input and Send Keys

  • Thread starter Thread starter Charlie Brown
  • Start date Start date
C

Charlie Brown

I can open an application such as Notepad and use SendKeys to send
input to the Notepad.

What I would like to do is reference an already running application and
then send keyboard input to it. Any thoughts? Can this be done with
sendkeys or is there another method.
 
Hello, Chuck,

Yes, I think that you could do this, but you would need to activate the
other application first (and hope that nothing changes that state before
the interaction is complete).

I strongly recommend finding a solution other than SendKeys. See if you
can't use the SendMessage API to send the keystrokes instead. (Try a
google search for "SendKeys alternatives" or something like that.) I
think that you will find a better and more consistently reliable solution.

Cheers,
Randy
 
Back
Top