MahM Posted November 15, 2015 Share Posted November 15, 2015 Hello everyoneThis is my first post in Autoit and i recently started to use Autoit so i hope you will ignore my noobiness :/I have a very simple use for imagesearch function. All i want is my script to recognize a specific image and stop the function automatically. below is my script but in there i am only testing the mousemove function when the image is recognized which however doesnt work yet so i came here to ask the professionals. I would really appreciate any help.My Script and the errors i get with it when i run it#include <ImageSearch.au3>(error: cant open file <ImageSearch.au3>.)HotKeySet('S', '_Start')$X = 0$Y = 0Func _Start()Do $Search = _ImageSearch('img2.bmp', 0, $X, $Y, 0)(error: _imageSearch(): undefined function.)Until $Search = 1MouseMove($X, $Y,10)EndFuncWhile 1 Sleep(100)WEnd I have included all of dll, imagesearch.au3, myscript.au3 and the img2.bmp into one folder inside desktop (Desktop > Imagesearch)I am running windows 7 64bit so i downloaded 64 bit Autoit version. I just dont know what can be wrong with such a simple script as i have proofread it million times now. Do i need to place the folders somewhere else for them to work? Link to comment Share on other sites More sharing options...
mikell Posted November 15, 2015 Share Posted November 15, 2015 The answer is in the helpfile - as often Link to comment Share on other sites More sharing options...
langthang084 Posted November 15, 2015 Share Posted November 15, 2015 (edited) imagesearch.au3 must be placed in C:\Program Files (x86)\AutoIt3\Include Edited November 15, 2015 by langthang084 Link to comment Share on other sites More sharing options...
JohnOne Posted November 16, 2015 Share Posted November 16, 2015 Or quotes used instead of angle brackets, like in the link mikell posted. minxomat 1 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 More sharing options...
MahM Posted November 16, 2015 Author Share Posted November 16, 2015 Thanks guys, it did sort out the error but now i have a different issue. first of all i want to tell you where i have placed the folders.Imagesearch,au3 is placed in C:\Program Files (x86)\AutoIt3\Includewhile the script,image.bmp and dll are included in C:\Program Files (x86)\AutoIt3\Include\ImagesearchWhat happens is when i run the script, it runs but then does nothing eventhough i make sure the image the script is looking for is on the desktop visible. I have attached the image and the imagesearch.au3 so if anyone can see a mistake in them then please let me know. I took the snorlax2 image from browser and printscreening and cropping in paint so i am not too sure if imagesearch would still search for such images. Please can anyone give advice on what kind of images to use or if pixelsearch is better for me to use and etc?Really appreicate all the help. snorlax2.bmp.bmp imagesearch4.au3 ImageSearchDLL.dll ImageSearch.au3 Link to comment Share on other sites More sharing options...
Bert Posted November 16, 2015 Share Posted November 16, 2015 (edited) . Edited November 16, 2015 by Bert The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
MahM Posted November 16, 2015 Author Share Posted November 16, 2015 btw the script has snorlax2.bmp as the image to look for. Also i wanted my script to click on the image when it spots it but at the moment when i run it, it does nothing so maybe it doesnt recognize the image. Thank you Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 16, 2015 Moderators Share Posted November 16, 2015 MahM,That image looks very much like part of a game - is that indeed the case?M23 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...
feistcomputers Posted November 16, 2015 Share Posted November 16, 2015 Hey if you figure this out can you please message me, i've been trying to get this to work for months. I'm a noob too. Love Auto it just cant get this to work Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 16, 2015 Moderators Share Posted November 16, 2015 feistcomputers,If a Moderator has asked a question in a thread to ascertain its legality, it is not acceptable for someone else to post before an answer is forthcoming and acknowledgedI understand your impatience, but please do not do it again.M23 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...
Developers Jos Posted November 16, 2015 Developers Share Posted November 16, 2015 Or quotes used instead of angle brackets, like in the link mikell posted.Not really, the only think changing with <> or "" is the sequence it searches the different directories, but it should still find in in case it is located in the scriptdir.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MahM Posted November 16, 2015 Author Share Posted November 16, 2015 Yes it is part of a game, is there something wrong? Link to comment Share on other sites More sharing options...
Developers Jos Posted November 16, 2015 Developers Share Posted November 16, 2015 Yes, Please read our forum rules in relation to game automation.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts