Jump to content

Send commande


Recommended Posts

hi,

When i use Send commande for send text for example on notepad, the send command is sent deveral times

for example if i use commande

send('toto',1)

send('{ENTER}'),0

then on the notepad i have

toto

toto

toto

toto

any idea ?

Link to comment
Share on other sites

The behaviour you describe suggests a loop. Please post the rest of your code as well (or at least a larger part of it). Also, the "0" behind Send("{ENTER}") must trigger an error. I presume it's a typo :D

Alzo

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

The behaviour you describe suggests a loop. Please post the rest of your code as well (or at least a larger part of it). Also, the "0" behind Sen("{ENTER}") must trigger an error. I presume it's a typo :D

Alzo

My code delphi is :

var

i: integer;

sText: string;

begin

if trim(Edit1.Text) = '' then

begin

Showmessage('Veuillez saisir un texte');

ActiveControl := Edit1;

exit;

end;

FStop := False;

if (trim(Edit2.Text) = '') then Edit2.Text := '20';

if (trim(Edit3.Text) = '') then Edit3.Text := '400';

sText := trim(Edit1.Text);

for i := 1 to strToInt(Edit2.Text) do

begin

if FStop then break;

if sText <> '' then

begin

Autoit.Send(sText, 1);

Autoit.Send('{ENTER}', 0);

Autoit.Sleep(StrToInt(Edit3.Text));

end;

end;

if i put edt2.text := '10' then the outpout is ttriggered to 28 ???

Link to comment
Share on other sites

I'm afraid I don't know delphi, so I can't tell what is going wrong. The autoit part appears to be correct to me :D

Edited by marfdaman

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...