BeZ Posted August 26, 2006 Posted August 26, 2006 (edited) Here is a part of a script I made: While 1 $Rapide = $Rapide + 1 Sleep (50) $msg = GUIGetMsg() Select Case $Rapide = 18000 ExitLoop Case $msg = $button_stop GUIDelete ("compteur") _FileWriteLog(@ScriptDir & "\Internet.log", "-=| Prix : " & Round($cout, 2) & "$ |=-") prix () EndSelect WEnd Do $cout = $cout + 0.001 $msg = GUIGetMsg() GUICtrlSetData ($coutpresent, Round($cout, 2) & " $ + taxes") Sleep (900) Until $msg = $button_stop Every hour, $cout should raise of 4.00 but it doesn't. Is this because of the time it takes to do the loop ? BeZ Edited August 26, 2006 by BeZ
Moderators SmOke_N Posted August 26, 2006 Moderators Posted August 26, 2006 Well, have you tried lowering the sleep? What is the actual output if it isn't 4.00. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
BeZ Posted August 26, 2006 Author Posted August 26, 2006 It is lower than 4.00 I don't know what number exactly. Is there a way to know how long my loop take in milisecond to execute?
Paulie Posted August 26, 2006 Posted August 26, 2006 It is lower than 4.00 I don't know what number exactly. Is there a way to know how long my loop take in milisecond to execute?TimerInt/Diff?
Moderators SmOke_N Posted August 26, 2006 Moderators Posted August 26, 2006 It is lower than 4.00 I don't know what number exactly. Is there a way to know how long my loop take in milisecond to execute?Now that depends on what you have going on in that loop, every line of something to do is going to slow it down... here's an example, they both look the same, but 1 is slower than the other:Local $nCount = 1, $Time = TimerInit() Do Until $nCount = 1 MsgBox(64, 'Info:', Round(TimerDiff($Time), 4) & ' milliseconds') Local $iCount, $iTime = TimerInit() Do $iCount += 1 Until $iCount = 1 MsgBox(64, 'Info:', Round(TimerDiff($iTime), 4) & ' milliseconds') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
BeZ Posted August 26, 2006 Author Posted August 26, 2006 Thanks Smoke N this is what I was looking for.
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