Keyword Reference


Do...Until

Loop based on an expression.

Do
statements
...
Until <expression>

Parameters

expression The statements in between Do...Until are executed until the expression is true.

Remarks

Do...Until statements may be nested.
The expression is tested after the loop is executed, so the loop will be executed one or more times.

Related

ContinueLoop, ExitLoop

Example

#include <MsgBoxConstants.au3>

Local $i = 0
Do
        MsgBox($MB_SYSTEMMODAL, "", "The value of $i is: " & $i) ; Display the value of $i.
        $i = $i + 1 ; Or $i += 1 can be used as well.
Until $i = 10 ; Increase the value of $i until it equals the value of 10.