HotKeySet("^!x", "QuitProg") ;press ctrl+alt+x to stop program #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",1) #endregion --- ScriptWriter generated code End --- ;$pixel = PixelGetColor(260, 670) ;If $pixel = Dec("D63839") Then ;EndIf ;MouseMove(260,670) $x = 270 $y = 670 MsgBox(0, "Ready", "Press OK to start Mikey's Dockyard Bot2. Press ctrl+alt+x to exit at any time.") sleep(2000) MouseMove($x,$y+20) $colour = 0x000000 ;black Local $PixelCheck;, $NewCheck ;$PixelCheck = PixelCheckSum(260, 670, 260, 670); Get the checksum for this area. ;$PixelCheck = PixelSearch(260, 670, 260, 670, 000000) $PixelCheck = PixelGetColor($x, $y) ;Msgbox(48,"PixelChecksum",$PixelCheck) ;if $PixelCheck <> 000000 Then ; Msgbox(48,"PixelChecksum",$PixelCheck) ;Else ; Exit ;EndIf sleep(2000) ;ProcessSetPriority("AutoIt3.exe", 3) $i = 0 While 1; Keep going ;$NewCheck = PixelCheckSum(260, 670, 260, 670) If $PixelCheck <> "0" Then ; The old pixel checksum and the new one are different. ;$PixelCheck = $NewCheck; Update the $PixelCheck to the new value ; Let us now it has changed. Change this to what you want to happen when the colour in the region changes. ;Msgbox(48,"PixelChecksum",$PixelCheck) $coord = PixelSearch($x, 600, $x, 730, $colour) If Not @error Then ;do nothing Else Send("{SPACE}") $i+=1 if ($i > 7) Then ;$x = 320 EndIf EndIf $PixelCheck = PixelGetColor($x, $y) MouseMove($x,$y+20) EndIf $PixelCheck = PixelGetColor($x, $y) Sleep(10); Just to give the CPU a bit of a break Wend Func QuitProg() Exit EndFunc