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

ImageSearch

$
0
0

Hello, I'm having some issues on this.

Keep in mind that i'm starting to learn the basics of AutoIt now...

AutoIt         
#include <ImageSearch.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Lane Bot", 186, 195, 769, 326) $Radio1 = GUICtrlCreateRadio("Mid", 16, 64, 73, 17) GUICtrlSetFont(-1, 10, 400, 0, "Consolas") $Radio2 = GUICtrlCreateRadio("Top", 16, 16, 113, 17) GUICtrlSetFont(-1, 10, 400, 0, "Consolas") $Radio3 = GUICtrlCreateRadio("Adc", 16, 88, 65, 17) GUICtrlSetFont(-1, 10, 400, 0, "Consolas") $Radio4 = GUICtrlCreateRadio("Support", 16, 112, 65, 17) GUICtrlSetFont(-1, 10, 400, 0, "Consolas") $Radio5 = GUICtrlCreateRadio("Jungle", 16, 40, 113, 17) GUICtrlSetFont(-1, 10, 400, 0, "Consolas") $Button1 = GUICtrlCreateButton("READY", 16, 144, 81, 25, $WS_GROUP) GUICtrlSetFont(-1, 11, 800, 2, "Consolas") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $X = 0, $Y = 0 While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit          Case $Button1             Bot()     EndSwitch  WEnd Func Bot() $Search = _ImageSearch('blank.png', 0 , $X , $Y , 0)             If $Search = 1 Then                MouseClick($X, $Y , 10)             Else                Bot()             EndIf EndFunc

What i want, is that AutoIt keeps looking for the Image until it finds it, I'm trying to create a loop but it's not working. 

 

Someone help me please :3

Thank you for time.

Goncalo


Viewing all articles
Browse latest Browse all 12506

Trending Articles



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