Home All Groups Group Topic Archive Search About

Keyboard Input and Send Keys

Author
26 Feb 2006 6:42 PM
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.

Author
27 Feb 2006 3:27 PM
Charlie Brown
Just bumping this message from the weekend.
Author
28 Feb 2006 9:26 AM
R. MacDonald
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


Charlie Brown wrote:

Show quoteHide quote
> 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.
>