Jump to content
NickWON

ImageSearch

Recommended Posts

NickWON

Hello , im Nick ;-)

I just registered here because i recently started to try out some autoit scripting. 

And my first project ... after "Hello World" should be a simple little bot for my gf ... who is playing some stupid little fb browsergame in her spare time . 

So ... i tryed myself getting into FF.au3 .. and also used all the necessary extentions .. Mozrepl , Firebug , Firepath ... but i couldnt realy get into it , firepath and bug didnt give me the informations that i needed , watched guides , tutorials . but it seems like im to newbie for that . 

Ok. Next try ... Image Search ... atleast with my understanding I have done everything right . but i am still watching with the eyes of an newbie . 

Maybe somebody of you smart guys can explain me what went wrong with my code . It should find bmp1 , click it . Find bmp 2 , click it . And repeat . But its not doing anything . dont even give me an error text .

Please stay friendly . Its my first project and im totally overwelmed , some guiding would be very helpfull . Love and peace , looking for a nice conversation with you guys . 

 

#include <ImageSearch.au3>


Func   ; click bmp 1 

   $search = _ImageSearch("bmp1.bmp",1,$x,$y,0)

   If $search = 1 Then
      MouseClick("LEFT",$x,$y,1)
   Else
     MsgBox("","Error 1","Bild wurde nicht gefunden")
  EndIf

  EndFunc

  Func ;click bmp 2

     $search = _ImageSearch("bmp2.bmp",1,$x,$y,0)

     If $search = 1 Then
      MouseClick("LEFT",$x,$y,1)
   Else
     MsgBox("","Error 1","Bild wurde nicht gefunden")
  EndIf

  EndFunc

 

Share this post


Link to post
Share on other sites
Melba23

NickWON,

Welcome to the Autoit forum.

Unfortunately you appear to have missed the Forum rules on your way in (the link is in the menu bar at the top of the page). Please read them now, particularly the bit about not discussing game automation, and then you will understand why you will get no help and why this thread is now locked.

I hope to see you again soon with a legitimate question.

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.

×