Board index » delphi » How could I send keystrokes from my appl to another program

How could I send keystrokes from my appl to another program

Hello!

 I would like to have a function in a program so it is sending the
same keystrokes as if I have typed them directly in the other program.

 Example:

 I will have some text entered in a file in Notepad. Instead of doing
this manualy, my program should do the this job.

 Has somebody a solution for me ??

Best regards

 G?ran Pettersson
e-mail: g.petters...@udt.se

Exuse my bad English 8-))

 

Re:How could I send keystrokes from my appl to another program


Quote
g.petters...@udt.se (G?ran Pettersson) wrote:
>Hello!
> I would like to have a function in a program so it is sending the
>same keystrokes as if I have typed them directly in the other program.

> Example:
> I will have some text entered in a file in Notepad. Instead of doing
>this manualy, my program should do the this job.
> Has somebody a solution for me ??

You may want to try

  http://www.mindspring.com/~cityzoo/tips/tips.html

where you will find a collection of Delphi tips. As far as I remember
you will find "Sendkeys" which is a DLL+unit which does what you want.

Stefan.

Re:How could I send keystrokes from my appl to another program


Check out the DDE components and set up a direct link.

--
                                  '''
                                 (0 0)
---------------------------oOO----(_)----OOo----------------------------
 "It's not whether you get knocked down, its whether you get up."
 "The harder you work, the harder it is to surrender." - Vince Lombardi
------------------------------oooO---Oooo-------------------------------
                             (   )   (   )
                              \ (     ) /
                               \_)   (_/

Other Threads