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

Loop problem

$
0
0
Hi guys! I'm ultra noob in programming, so pls don't judge me, this is the first thing I ever did.

Yet, I have menaged to achieve my goal with a small problem. A set of clicks on the screen, depending on the color of the pixel.
In other words, if the color is red(16711680), restart the script, and if it's not, continue with the script. I don't know how or which command restarts the script.
I couldn't find it in help files and forums for hours now... Thx in advance :)

sleep(5000)
MouseClick("left", 1418, 49, 1)
sleep(15000)
$n = PixelGetColor(963, 411)
Switch $n
Case 16711680
MsgBox(0, "It's RED, restart script!", $n)
  >>>>>missing line
Case Else
MsgBox(0, "It's GREEN, continue!", $n)
EndSwitch
MouseClick("left", 862, 415, 1)
sleep(10000)
MouseClick("left", 647, 891, 1)
send ("45")
MouseClick("left", 572, 925, 1)
MouseClick("left", 1058, 493, 1)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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