shay Posted January 20, 2010 Posted January 20, 2010 (edited) HI all i start using loop in my testing script, unfortunately i`m new to the loop commands, the above script sometime work and sometime not i want to do loop till find different text on window or timer expire, for timer i use TimerInit + TimerDiff any suggestion what did i do wrong or any improvement? $timeout = IniRead($path, "General", "loop_wait", "297000") $begin = TimerInit() Do $prepar = WinExists("LU", "Preparing file transfer") if $prepar = 1 then ExitLoop if WinExists("LU", "File transfer complete") then $compleat = "1" if WinExists("LU", "Error: LU not responding") then $notR = "1" if WinExists("LU0", "File transfer stopped") then $stop = "1" $dif = TimerDiff($begin) sleep(300) WinActivate("LU-30",'') ToolTip("Automation: Loop in progress", 20, 250) until $dif > $timeout Or $compleat = "1" or $notR = "1" or $stop = "1" Edited January 21, 2010 by shay "If the facts don't fit the theory, change the facts." Albert Einstein
somdcomputerguy Posted January 20, 2010 Posted January 20, 2010 What does $timeout equal? Or did miss that somewhere? - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
shay Posted January 21, 2010 Author Posted January 21, 2010 What does $timeout equal? Or did miss that somewhere?$timeout = IniRead($path, "General", "loop_wait", "297000")the $path lead to the DLL file "If the facts don't fit the theory, change the facts." Albert Einstein
AlmarM Posted January 21, 2010 Posted January 21, 2010 (edited) IniRead a DLL file? Thats new to me Edited January 21, 2010 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
shay Posted January 21, 2010 Author Posted January 21, 2010 IniRead =INI my bad! "If the facts don't fit the theory, change the facts." Albert Einstein
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