Zag8888 Posted April 13, 2019 Posted April 13, 2019 (edited) I downloaded: https://www.autoitscript.com/forum/files/file/471-image-search-udf/ I have also added #include "_ImageSearch.au3" and "_ImageSearchDebug.au3" to my script. My script its in the same folder of _ImageSearcha.au3,_ImageSearchDebug.au3 (with dll files etc.) Every time I try to run my script I get: Line48 Error: Unknown function name. While(_ImageSearch(Seach_1.bmp, 0) And _ImageSearch(Seach_2.bmp, 0) <> True) Sleep(100) WEnd ;Sleep until you see this 2 image If(_ImageSearch(Seach_1.bmp, 0) And _ImageSearch(Seach_2.bmp, 0) = True)Then Edited April 13, 2019 by Zag8888
Developers Jos Posted April 13, 2019 Developers Posted April 13, 2019 (edited) Where is your #include<> statement to add the imagesearch UDF's? Jos Edited April 13, 2019 by 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.
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 1 minute ago, Jos said: Where is your #include<> statement to add the imagesearch UDF's? JOs Hey, I should type #include< _ImageSearch.au3 > and < _ImageSearchDebug.au3 > instead of ""? Whats the difference?
Nine Posted April 13, 2019 Posted April 13, 2019 (edited) well your code is badly formatted...replace loop with : Local $pos1, $pos2 While True $pos1 = _ImageSearch("Seach_1.bmp") if not $pos1[0] then ContinueLoop $pos2 = _ImageSearch("Seach_2.bmp") if $pos2[0] then ExitLoop Sleep(100) WEnd ;Sleep until you see this 2 image Your bmp where not included in quotes, and return value is an array. Please read carfully the headers of the functions. I just realized that the "no match" is not an @error but 0 in array[0] Edited April 13, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Developers Jos Posted April 13, 2019 Developers Posted April 13, 2019 No idea what you are asking me, but the posted code does not contain an #include<>. As to the syntax of #include, I refer you to the helpfile. 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.
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 12 minutes ago, Jos said: No idea what you are asking me, but the posted code does not contain an #include<>. As to the syntax of #include, I refer you to the helpfile. Jos I have fixed this, and now it work!
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 20 minutes ago, Nine said: well your code is badly formatted...replace loop with : Local $pos1, $pos2 While True $pos1 = _ImageSearch("Seach_1.bmp") if @error then ContinueLoop $pos2 = _ImageSearch("Seach_2.bmp") if not @error then ExitLoop Sleep(100) WEnd ;Sleep until you see this 2 image Your bmp where not included in quotes, and return value is an array. Please read carfully the headers of the functions. Hey, thanks for your help, I tried this code but it didn't worked for me
Nine Posted April 13, 2019 Posted April 13, 2019 ya reread my post I changed it so it should work now... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 21 minutes ago, Nine said: ya reread my post I changed it so it should work now... Missing separator character after keyword.: WEnd? WEnd^ ERROR
Nine Posted April 13, 2019 Posted April 13, 2019 that's a bad character coming from the copy/paste, just delete it... Zag8888 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 Just now, Nine said: that's a bad character coming from the copy/paste, just delete it... thanks now work, I'm trying it rn
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 (edited) 12 minutes ago, Nine said: that's a bad character coming from the copy/paste, just delete it... Not working, full code While True if not $pos1[0] then ContinueLoop if $pos2[0] then ExitLoop Sleep(100) WEnd If($pos1[0] And $pos2[0] = 1) Then Sleep(2000) MouseClick("left", 436 , 745 ) Sleep(5000) Endif THe code works with 0 errors, but the image its not found I guess Edited April 13, 2019 by Zag8888 Nine 1
Developers Jos Posted April 13, 2019 Developers Posted April 13, 2019 3 minutes ago, Zag8888 said: Not working, full code While True if not $pos1[0] then ContinueLoop if $pos2[0] then ExitLoop Sleep(100) WEnd If($pos1[0] And $pos2[0] = 1) Then Sleep(2000) MouseClick("left", 436 , 745 ) Sleep(5000) Endif THe code works with 0 errors, but the image its not found I guess Where in that code are you check for the image match? What about you stop feeding us bits and pieces and post the full test code? Jos Zag8888 1 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.
Zag8888 Posted April 13, 2019 Author Posted April 13, 2019 (edited) 2 hours ago, Jos said: Where in that code are you check for the image match? Yes What about you stop feeding us bits and pieces and post the full test code? Other code is useless and also is working perfectly... Jos Edit, thanks for all your help guys, I have finally fix it, I added 5 tolerance instead of 0 and now it works great Edited April 13, 2019 by Zag8888
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