Jump to content
Sign in to follow this  
miketh2005

Noob Question... how to wait?

Recommended Posts

miketh2005

Sorry for this really noob question. I just couldn't find it in the help file. How do I make the bot wait so many milliseconds, again? Coming back to scripting after about 6 months off and I lost all my autoit file so I can't learn off em. Thanks!

Share this post


Link to post
Share on other sites
Neno

Sleep() ;?

Sleep is good, although personally I don't use it except once throughout my entire script (In a heartbeat function).

If you require that only a certain portion of your script be artificially slowed down, use timers.

I generally set timers up with variables and check those variables later.

IE

$timer = _Timer_Init()
While 1
     If _Timer_Dif($timer) >= 20000 Then ;20 second wait
          ;blah blah
     EndIf
WEnd
Edited by Neno

Share this post


Link to post
Share on other sites
miketh2005

Thanks guys.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×