Use Continue in Repeated Code

Get help with using AutoHotkey and its commands and hotkeys
Posts: 78
Joined: 10 Feb 2018, 19:05

Use Continue in Repeated Code

23 Sep 2018, 15:25

I have a snippet of code that appears in several places inside a loop I'm writing, and this snippet uses Continue to terminate the current loop iteration and start a new one. I tried writing the snippet as a function, but the script gave a warning saying that Continue had to be used inside a loop. Is there any way I can accomplish this programming feat?
User avatar
Posts: 513
Joined: 29 Sep 2013, 22:59

Re: Use Continue in Repeated Code

23 Sep 2018, 19:54

Please don't start a new post for the same question

Maybe you're looking for something like :

Code: Select all

loop 10
	if namedLoop(A_Index)
	MsgBox % A_Index
	if (i < 5)
		return 1

Return to “Ask For Help”

Who is online

Users browsing this forum: albertocv, Bing [Bot], braunbaer, Eureka, gero, jekko1976 and 48 guests