Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

I need help with a loop

$
0
0
	While 1
	$a = PixelGetColor(835,302) 
	$b = PixelGetColor(840,435)
	If $a = 0x5383E8 Then
	MouseClick("Left",835,302,1)
	Elseif $b = 0x818AA0
	ExitLoop
	EndIf
	WEnd

What I'm trying to do is wait for $a to become a color and then left click (takes about 40 seconds usually). Problem is that $a doesn't always change to the color I want so I want to look for either $a =  0x5383E8 or $b = 0x818AA0 (which happens if $a doesn't show up). What I am getting with the above code is that the loop exits immediatly instead of looping until either $a or $b = the color I need it to.  How do I loop this so that it keeps looking until either happens?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>