Sign in to follow this  
Followers 0
vra

Tryin to make a random sleep script PLZ help

6 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by nfwu

Share this post


Link to post
Share on other sites

I just want to give you my most sincere thanks this has helped me a great deal. Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0