nova4 Posted May 8, 2014 Share Posted May 8, 2014 (edited) Hello ppl, first the code: Func caras() print("Buscando punto") $found = False; $x = 746 $y = 482 While Not $found print("Encontrado") $coord =_ImageSearch("cara.png", 1, $x, $y, 0) If Not @error Then Sleep(500) MouseClick("left", $x * $y, 1, 10) ExitLoop Else Sleep(100) EndIf WEnd Return True EndFunc I have imagesearch file in the same directory, and this function makes the script stop. If i deleteit from the folder, then i get and error #include<imagesearch.au3> error opening So i dont really know how to make this work, this is the only image search i have in the script. Edited May 8, 2014 by nova4 Link to comment Share on other sites More sharing options...
Geir1983 Posted May 8, 2014 Share Posted May 8, 2014 Try to add a path to your file: $coord =_ImageSearch(@ScriptDir &"\cara.png", 1, $x, $y, 0) Link to comment Share on other sites More sharing options...
nova4 Posted May 8, 2014 Author Share Posted May 8, 2014 (edited) Try to add a path to your file: $coord =_ImageSearch(@ScriptDir &"\cara.png", 1, $x, $y, 0) tryed it and didnt work, maybe i should just reinstall autoit, i dont know why such a simple func like that dosent work Edited May 8, 2014 by nova4 Link to comment Share on other sites More sharing options...
Geir1983 Posted May 8, 2014 Share Posted May 8, 2014 (edited) Well, your loop only exits if it finds the image... Doubt reinstalling will fix anything. What you need to do is add some debugging to find out what is going wrong. Is both the dll and your image file in the same folder as your script? You can use ConsoleWrite("Insert some debug text" & @CRLF) in strategic places to help you figure it out. Edited May 8, 2014 by Geir1983 nova4 1 Link to comment Share on other sites More sharing options...
JohnOne Posted May 8, 2014 Share Posted May 8, 2014 What you need to do, is do better with your description than "this function makes the script stop". 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...
nova4 Posted May 8, 2014 Author Share Posted May 8, 2014 What you need to do, is do better with your description than "this function makes the script stop". Do u want a description of what the scripts does¿ or do u want the file? i can share u both if u dont have any ideas for ur scripts. Tell me wich one and ill writte more or ill atach the file. So u can have something to play for a while. Ive already solved the problem just had to download the dll again, all i did was read the other dudes answers, i guess he didnt needed so much stuff to figure out what could be. Link to comment Share on other sites More sharing options...
nova4 Posted May 8, 2014 Author Share Posted May 8, 2014 (edited) By the way i allmost forgot, thanks Geir1983. If i ever make a question again, ill add a complete log and description of activitys and stuff ive been doing for the past 10 yeas so maybe that way John can figure out a simple a nicely answer like Geir did. Edited May 8, 2014 by nova4 Link to comment Share on other sites More sharing options...
JohnOne Posted May 8, 2014 Share Posted May 8, 2014 And maybe you can kiss my arse. 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...
nova4 Posted May 8, 2014 Author Share Posted May 8, 2014 (edited) And maybe you can kiss my arse. I need a better decription of that arse, is it cracked to much? i can tell is widely used .. Edited May 8, 2014 by nova4 Link to comment Share on other sites More sharing options...
JohnOne Posted May 8, 2014 Share Posted May 8, 2014 Ok. lol Over and out! 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...
Moderators Melba23 Posted May 8, 2014 Moderators Share Posted May 8, 2014 Gentlemen (and I use the term loosely),Please act like grownups. nova4,JohnOne's request for more information was quite reasonable - the more we know about a problem the better we can advise you. 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...
nova4 Posted May 8, 2014 Author Share Posted May 8, 2014 (edited) He can ask for more info, or the file like i said in my replys, he just needs better manners thats all. Here John ill give u a tutorial of how to give an answer: Hey Nova, can u provide more info? i cant really tell what the problem is whit that short description in order to help i need to know more. Cheers, JhonnnyyyyOne ur friendly Pal ,, insted u prefer to use the clever dudes types of answer, remember John been friendly can help in life and it makes us feel better. Edited May 8, 2014 by nova4 Link to comment Share on other sites More sharing options...
Solution JohnOne Posted May 8, 2014 Solution Share Posted May 8, 2014 Thanks. 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...
nova4 Posted May 8, 2014 Author Share Posted May 8, 2014 Thanks. No thanks u for been so polite and for trying to help me, even if u didnt find and answer to my imagesearch problem because i didnt provide enogh information about it. Next time ill add a better description, so ur help can aid me faster and if u ever need something u know u can count on me. and this thread comes to and end. bye bye John either way thanks for at least taking the time to answer even if ur answers wasent the ones i espected. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now