Okay so, I have an other topic running but wasn't providing enough information so I hope if I start this topic with all the information provided that I will get help. So I have no "GOAL". I'm just experimenting with AutoIt. But I got stuck, I wanted to move the mouse every 1 second to a different spot in a specified area on the screen and if the mouse moved to a specific color it would click. But the problem now is, it isn't working and I dont know why. I use this site for testing my script: http://mrdoob.com/#/106/checkbox_painter . So.. When my mouse jumps on a checkmark it should click but it doesn't and I hope you guys can help me! Thanks in advance. This is the script I got for now:
HotKeySet("{F4}", "MyExit")
$pos = MouseGetPos()
Global $color1 = 0xDEDEDE
Global $color2 = PixelGetColor
While(1)
$posx = random(4,1915)
$posy = random(184,1014)
MouseMove( $posx, $posy)
sleep(1000)
PixelGetColor($pos[0], $pos[1])
if $color1 == $color2 Then
MouseClick("Left")
sleep(200)
Else
sleep(100)
EndIf
WEnd
func MyExit()
Exit
EndFunc