vra Posted July 25, 2006 Posted July 25, 2006 In a script i have been tryin to write I need help trying to come up with a random sleep from 1 to 3 sec. Cant seem to figure out how to make this happen could anyone show me which would be the right format for such script? Any help would be great.
jdumont Posted July 25, 2006 Posted July 25, 2006 have you tried the sleep command? maybe try posting your script. I got this from the help file... Sleep, <milliseconds> Halts execution of the script for the given number of milliseconds. Max is 2147483647. 1000 milliseconds = 1 second.
vra Posted July 25, 2006 Author Posted July 25, 2006 well i know how to use sleep in my script but what i want is lets say i have Sleep, 35000 what i want is to follow that script with a randomly generated additonal sleep of 1000 to 3000 but i am not sure how to write this script or even if its possible
Valuater Posted July 25, 2006 Posted July 25, 2006 Autoit v2 is kinda out-dated Autoit v3 has many, many upgraded controls give it a try... you can search "random" in the help file 8)
nfwu Posted July 25, 2006 Posted July 25, 2006 (edited) Like this: Random, rndnumber, 36000, 39000 Sleep, %rndnumber% For "variable" handling, look at these functions: EnvAdd, <Variable>, <Value> EnvSub, <Variable>, <Value> EnvMult, <Variable>, <Value> EnvDiv, <Variable>, <Value> SetEnv, <variable>, <value> #) Edited July 25, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
vra Posted August 19, 2006 Author Posted August 19, 2006 I just want to give you my most sincere thanks this has helped me a great deal. Thanks
Recommended Posts