Keyword Reference


ContinueLoop

Continue a While/Do/For loop.

ContinueLoop [level]

Parameters

level [optional] The level of the loop to restart. The default is 1 (meaning the current loop).

Remarks

ContinueLoop will continue execution of the loop at the expression testing statement (that is the While, Until or Next statement).

A negative level or zero value has no effect.

Even though any program that uses ContinueLoop can be rewritten using If-ElseIf-EndIf statements, ContinueLoop can make long scripts easier to understand.
Be careful with While/Do loops; you can create infinite loops by using ContinueLoop incorrectly.

Related

Do, ExitLoop, For, While

Example

#include <MsgBoxConstants.au3>

; Display all the numbers for 1 to 10 but skip displaying  7.
For $i = 1 To 10
    If $i = 7 Then
        ContinueLoop ; Skip displaying the message box when $i is equal to 7.
    EndIf
    MsgBox($MB_SYSTEMMODAL, "", "The value of $i is: " & $i)
Next