Jump to content

ImageSearch


Recommended Posts

Hello, I'm having some issues on this.

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

#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

Edited by SsCriPteR
Link to comment
Share on other sites

This is game automation.

>Forum Rules

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

It's the AutoIt forum rules that count here. Not the game companies. 

You can do it, just don't expect help from the Forum, as we will get reprimanded for even helping you.  :geek:

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Yes, you are "automating" finding something in your "game". Hence, "game automation". 

Sorry. :(

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

  • Moderators

SsCriPteR,

MikahS is quite right - thread locked. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...