Jump to content

Recommended Posts

Posted

u are putting the while loop inside the do until. Get rid of the while loop and it will work. $satisfied is whatever you want it to be to make it exit you loop.

Dim $iInit = TimerInit()
Do
;put what you want to run for 4 minutes in here, no while loop is needed, the Do Until takes care of it
Until TimerDiff($iInit)/1000 > 4*60
Posted

u are putting the while loop inside the do until. Get rid of the while loop and it will work. $satisfied is whatever you want it to be to make it exit you loop.

Dim $iInit = TimerInit()
Do
;put what you want to run for 4 minutes in here, no while loop is needed, the Do Until takes care of it
Until TimerDiff($iInit)/1000 > 4*60
What the .... ?

Dim $iInit = TimerInit()
While TimerDiff($iInit)/1000 < 4*60
;put what you want to run for 4 minutes in here, no while loop is needed, the Do Until takes care of it
Wend

The only argument able difference between Do .. Until and While .. Wend is that Do .. Until always executes at least once, because the expression is checked at the end of the loop instead of at the start.

Posted

Do
While 1
;some malicious code here wink.gif
   If $fSatisfied Then ExitLoop
WEnd
Until TimerDiff($iInit)/1000 > 4*60

I was commenting on him having the While inside the do until. I realize he could have just used a while.

Posted

u are putting the while loop inside the do until. Get rid of the while loop and it will work. $satisfied is whatever you want it to be to make it exit you loop.

Dim $iInit = TimerInit()
Do
;put what you want to run for 4 minutes in here, no while loop is needed, the Do Until takes care of it
Until TimerDiff($iInit)/1000 > 4*60
Thank you for explaining!!

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
  • Recently Browsing   0 members

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