Jump to content

Noob Question... how to wait?


Recommended Posts

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!

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...