Label problem with Loop

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
scriptors
Posts: 227
Joined: 25 Feb 2016, 09:01

Label problem with Loop

22 May 2018, 09:13

I have a script and have many similar Loop ... so:

Code: Select all

...
GoSub Missioni_GG
...

Missioni_GG:
	Loop
	{
			PixelGetColor, Res, 435, 160, RGB ; Gets the colour at the coordinates (x, y) in the active window
			if(Res = 0x384A59){ ; checks if Mission are ON
				Sleep 2000
				; verify
				break  ; Terminate the loop
				}
				Sleep 500
				MouseClick, left, 435, 160 ;click ON Mission
	}
Return
But have ERROR ... Label NOT exist :silent:
User avatar
TLM
Posts: 1608
Joined: 01 Oct 2013, 07:52
Contact:

Re: Label problem with Loop

22 May 2018, 14:35

hrmm, please run this by itself

Code: Select all

GoSub, Missioni_GG
return

Missioni_GG:
msgbox % "You fired the label: " A_ThisLabel
ExitApp
does that work?
scriptors
Posts: 227
Joined: 25 Feb 2016, 09:01

Re: Label problem with Loop

23 May 2018, 02:38

Today it work ... probably I have problem or something need complete reload of macro

Sorry for question :oops: ... i think to have som problem with "Loop" beginning of label
User avatar
TLM
Posts: 1608
Joined: 01 Oct 2013, 07:52
Contact:

Re: Label problem with Loop

23 May 2018, 10:56

It's always a good idea to include as much code as you can to outline the specific area of where you're having issues.
Feel free to ask if you have any further questions.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, Noitalommi_2, ulysim and 317 guests