Sign in to follow this  
Followers 0
SsCriPteR

ImageSearch

9 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Well, I'm just trying to create a bot, that when finds a image, it will write something. That's it. But can you help please?

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

This kind of Game Automation it's not going against the company rules. So i don't see what is the problem?

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Really? This is a simple bot, it's not gonna "hack" the game, all i need is help it to find the image  -_- :-(

Edited by SsCriPteR

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

SsCriPteR,

MikahS is quite right - thread locked. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0