Board index » delphi » Sendkeys doesn't work very good

Sendkeys doesn't work very good

  for I := 1 to 10000 do
    application.ProcessMessages;
  Sendkeys(PChar('^A'),true);
  for I := 1 to 10000 do
    application.ProcessMessages;
  Sendkeys(PChar('^C'),true);
  for I := 1 to 10000 do
    application.ProcessMessages;

This should select all text, then copy it but it doesn't. Has anyone ever
gotten this to work? I can do other things like altF4 to close a window
and that works fine. I can manually do a control A and control C and it
copies ok. I got the sendkeys code off of the Delphi 7 install disk.

 

Re:Sendkeys doesn't work very good


Nevermind. Forget this and my other post also. The problem with this one was
the uppercase A and C. Lowercase a and c is the way it works.

Quote
"uta" <i...@atemp.com> wrote in message

news:IrK5a.166$vU3.30099@newsread1.prod.itd.earthlink.net...
Quote
>   for I := 1 to 10000 do
>     application.ProcessMessages;
>   Sendkeys(PChar('^A'),true);
>   for I := 1 to 10000 do
>     application.ProcessMessages;
>   Sendkeys(PChar('^C'),true);
>   for I := 1 to 10000 do
>     application.ProcessMessages;

> This should select all text, then copy it but it doesn't. Has anyone ever
> gotten this to work? I can do other things like altF4 to close a window
> and that works fine. I can manually do a control A and control C and it
> copies ok. I got the sendkeys code off of the Delphi 7 install disk.

Other Threads