InStinct Posted April 30, 2013 Share Posted April 30, 2013 (edited) 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 April 30, 2013 by Melba23 Added tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 30, 2013 Moderators Share Posted April 30, 2013 (edited) 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. M23And 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 April 30, 2013 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts