Continue

Skips the rest of the current loop iteration and begins a new one. Valid only inside a loop.

Continue

 

Parameters

None.

 

Remarks

The continue command applies to the innermost loop in which it is enclosed. The use of break and continue are encouraged over goto since they usually make scripts more readable and maintainable.

 

Related

Loop, Break, Blocks

 

Example

; This example displays 5 MsgBoxes, one for each number between 6 and 10.
; Note that in the first 20 iterations of the Loop, the "continue" command
; causes the loop to start over before it reaches the MsgBox line.
Loop, 10
{
	if A_Index <= 5
		continue
	MsgBox, %A_Index%
}