How to make a program that cycles through urls?

How would I add this to the code?

NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. URL := "http://steamcommunity.com/id/"\ i := 0 CurURL := URL i+=1000000 Loop { CurURL := URL (1000000 + A_Index) ; Change to: CurURL := URL A_Index html := getHTML(CurURL) If (isPageEmpty(html)) { run, %CurUrl% ; Open Browser to the URL While !(GetKeyState("F2", "P")) ; PAUSE UNTIL F2 is pressed. continue } sleep, 500 }

isPageEmpty(html) { document := ComObjCreate("HtmlFile") document.write(html) return document.getElementsbyTagName("title")[0].innerText ~= "i)Error" }

getHTML(URL){ ComObjError(false) t:= ComObjCreate("WinHttp.WinHttpRequest.5.1") t.Open("GET", URL, true) t.Send() t.WaitForResponse() t:= t.ResponseText return t }

I tried this

/r/AutoHotkey Thread Parent