foolove Posted October 4, 2011 Posted October 4, 2011 While 1 = 1 $coord1 = PixelSearch( 538, 463, 626, 479, 0xE7E7E7 ) If Not @error Then MouseClick("left", $coord1[0], $coord1[1], 1) EndIf $FindDock = PixelSearch(766, 41, 781, 49, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock[0], $FindDock[1], 1) Else $FindDock2 = PixelSearch(784, 212, 797, 221, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock2[0], $FindDock2[1], 1) EndIf EndIf $FindDock3 = PixelSearch(803, 386, 817, 394, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock3[0], $FindDock3[1], 1) Else $FindDock4 = PixelSearch(819, 559, 834, 567, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock4[0], $FindDock4[1], 1) EndIf EndIf WEnd MouseClick("left", 1124, 591, 1, 0) Send("Welcome to a bot in testing 123!!!") Send("{ENTER}")
Xandy Posted October 4, 2011 Posted October 4, 2011 (edited) #include "misc.au3" While 1 = 1 if _ispressed("0d") then exitloop; press the ENTER key to exit the loop $coord1 = PixelSearch( 538, 463, 626, 479, 0xE7E7E7 ) If Not @error Then MouseClick("left", $coord1[0], $coord1[1], 1) EndIf $FindDock = PixelSearch(766, 41, 781, 49, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock[0], $FindDock[1], 1) Else $FindDock2 = PixelSearch(784, 212, 797, 221, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock2[0], $FindDock2[1], 1) EndIf EndIf $FindDock3 = PixelSearch(803, 386, 817, 394, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock3[0], $FindDock3[1], 1) Else $FindDock4 = PixelSearch(819, 559, 834, 567, 0xFEFEFE ) If Not @error Then MouseClick("left", $FindDock4[0], $FindDock4[1], 1) EndIf EndIf WEnd MouseClick("left", 1124, 591, 1, 0) Send("Welcome to a bot in testing 123!!!") Send("{ENTER}") Edited October 4, 2011 by songersoft Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
ahmet Posted October 4, 2011 Posted October 4, 2011 You haven't set condition for exiting loop. Look at ExitLoop function.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now