Page 1 of 1

Need help with some code

Posted: 17 Jun 2019, 02:05
by HundsWolf
Im currently working on a script, and cant figure out how to do the next step in it.
I want the Script to check a color on X/Y and compare it to a color im telling it. If the colors are the same it should proceed else it should wait for x and then go back to checking the color and comparing it again till they are identical. Since im new to coding I cant figure out how to get the loop with the color check and the if/else statment.
Ty for reading/helping me out!

HundsWolf

Re: Need help with some code

Posted: 17 Jun 2019, 07:42
by Rohwedder
Hallo,
try:

Code: Select all

Loop
{
	PixelGetColor, Color , 100, 200 ;check a color on X/Y
	If Color = x800080 ;compare it to a color im telling it
		Break ;If the colors are the same it should proceed
	Sleep, 100 ;else it should wait for x (milliseconds)
} ;and then go back to checking the color and comparing it again