Jump to content
Sign in to follow this  
InStinct

ImageSearch wont work

Recommended Posts

InStinct

Hey guys I am very very new with AutoIt so I just wanted to ask why it doesnt press F2 when the Image was not found.

Here is my Script :

#include <ImageSearch.au3>

$X = 0
$Y = 0
Func Start()
   $Search = _ImageSearch('CritDmg.bmp', 1, $x1, $y1, 0)
   If $Search = 1 Then 
 MouseClick("left")
 MouseClick("left")
   Else
 Send("{F2 down}")
 Sleep(100)
 Send("{F2 up}")
   EndIf
   EndFunc

Please dont be to hard with me how I said before im pretty new with Autoit.

Edited by Melba23
Added tags

Share this post


Link to post
Share on other sites
Melba23

InStinct,

Welcome to the AutoIt forum. :)

No-one will be hard on you, but next time I suggest you post a question like this in the thread that deals with that particular UDF. ;)

M23

And in future when you post code please use Code tags - put [autoit] before and [/autoit] after your posted code. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. ;)

Edit: I see you took my advice. ;)

Edited by Melba23

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  

×