Jump to content

Help with ImageSearch


dinzing
 Share

Recommended Posts

hi there i was wondering if anyone can point me in the right direction for some info on how to use ImageSearch with autoit 3 ive been searching all over for it and never find anything i did manage to find someones project on sourceforge that is using ImageSearch but has no info as to how to use it or make my own script using it

thanks kindly inadvance for and help/info

"Time Is God"

Link to comment
Share on other sites

hi there i was wondering if anyone can point me in the right direction for some info on how to use ImageSearch with autoit 3 ive been searching all over for it and never find anything i did manage to find someones project on sourceforge that is using ImageSearch but has no info as to how to use it or make my own script using it

thanks kindly inadvance for and help/info

What, everything except put the word onto the search field and click?

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

im kinda new (can you tell) and was hoping for some better info as to haw to use it the only example i found used SerachClick.au3 as well do i need this or can i just use imageserch ? is there a better discription of use other then the comments in imageserch.au3 ¿

"Time Is God"

Link to comment
Share on other sites

  • Moderators

Hi, Dinzing. A search of this forum reveals 146 topics, many with examples. I would suggest reading through these to find just what you're looking for.

Some examples I found in just a few moments of searching:

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

i guess i realy am that new and was fogeting to switch the serch to Forum instead of "this Topic" sry for that

tho i still cant find anything for SearchClick im guessing it was made by the owner of the post i found on SourceForge

my next question is how would i get imageserch to loop looking for something on screen while the rest of the script continues to run and if the loop finds what its looking for it should pause or restart the main script ??

"Time Is God"

Link to comment
Share on other sites

  • 2 weeks later...

Move the mouse pointer to image found.

#include <ImageSearch.au3>
$x1=0 ;inicia variáveis de posição
$y1=0
HotKeySet("{ESC}", "_Exit") ;Define Hotkey pra finalizar o script
if FileExists("affe.bmp") == 0 then ;verifica se a imagem de referência existe
  MsgBox(0,"Error","The sample was not found.")
  exit
EndIf
While 1
Sleep(200) ;intervalo do loop

$result = _ImageSearch("test.bmp",1,$x1,$y1,0);((caminho)imagem de referência,tolerância,
                                              ;$x e $y variáveis que serão atribuidas a posição da imagem
             ;se a posição a ser retornadada é o meio ou o topo esquerdo da imagem
             ;0 pra centro e 1 pra topo esquerdo) função retorna 1 se encontrar, 0 se não encontra
if $result=1 Then ;faz a condição
MouseMove($x1,$y1,3) ;move o ponteiro do mouse para as posições geradas na função
MsgBox(0,"Found","picture found.")
EndIf
Wend
Func _Exit();função para finalizar o script
    Exit 0
EndFunc
Link to comment
Share on other sites

ok so i got it all working now the only thing left is to have image search loop looking for a image to pop up while the rest of the script continues to run if it finds the image then pause do somethign adn contnue most of it i can figue out now im just not sure how to get part of a script to loop and let the rest of it still run ?

i could make a second script but would like to learn how to do it all in one if theres a way

"Time Is God"

Link to comment
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
 Share

  • Recently Browsing   0 members

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