Jump to content

ImageSearch into a specif area


Recommended Posts

Hi

I'm trying to restric the area for my ImageSarch run to improve the script performance (i think), but i'm very begginner here and idk how.

Can you help me?

Thanks!

#include "ImageSearch.au3"

HotKeySet("{Space}", buscar)
HotKeySet("{p}", parar)
HotKeySet("{esc}", sair)

Global $posx, $posy, $busca

while 1

    If $busca = 1 Then
        $achou = _ImageSearch("imagem.bmp", 1, $posx, $posy, 0)
        If $achou Then
            Send("{F}")
            Sleep(1500)
        EndIf
    EndIf
WEnd


Func buscar()
    $busca = 1
    Beep()
    Beep()
EndFunc

Func parar()
    $busca = 0
    Beep()
EndFunc

Func sair()
    Exit
EndFunc

 

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...