andromeda Posted July 9, 2006 Posted July 9, 2006 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 ?
marfdaman Posted July 9, 2006 Posted July 9, 2006 (edited) 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 Alzo Edited July 9, 2006 by marfdaman Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
andromeda Posted July 9, 2006 Author Posted July 9, 2006 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 AlzoMy 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 ???
marfdaman Posted July 9, 2006 Posted July 9, 2006 (edited) 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 Edited July 9, 2006 by marfdaman Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
andromeda Posted July 9, 2006 Author Posted July 9, 2006 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 for me it don't workwhen o put 10 it trigerred 35 timesi don't understand.Thank in advance
Buckw1 Posted July 10, 2006 Posted July 10, 2006 I don't know delphi either but I would sure be researching the behavior of: strToInt(Edit2.Text) since it is obviously interpreting the value wrong.
Paulie Posted July 10, 2006 Posted July 10, 2006 Why don't we try to limit the threads based on other scripting languages in this, theAutoit V3 support forum
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now