InStinct Posted April 30, 2013 Share Posted April 30, 2013 (edited) <snip> Post deleted as it refered to a game bot. Edited April 30, 2013 by Melba23 As explained in the post Link to comment Share on other sites More sharing options...
cookiekiller89 Posted May 5, 2013 Share Posted May 5, 2013 Hey all, I'm trying to use the ImageSearch func, and include, but neither seem to work, all I recieve under #include <ImageSearch.au3> is ERROR: can't open include file <as previous> and under the function <undefined func> obviously due to no .au3. I've tryed a few of the suggest files in this thread and I also am running autoit on x86 and have tryed moving the files around to no end. am i missing something? thanks for your time Link to comment Share on other sites More sharing options...
BrewManNH Posted May 5, 2013 Share Posted May 5, 2013 Put the UDF file in your script's folder, then use #include "ImageSearch.au3" instead of using <>. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
cookiekiller89 Posted May 5, 2013 Share Posted May 5, 2013 Put the UDF file in your script's folder, then use #include "ImageSearch.au3" instead of using <>.Thanks brew, it's my first day with autoit, i was getting confused 'cause the folders name was 'include' and wasn't accessible through startmenu> all programs , but found it attempting to do something that wouldn't have helped me.cheers! Link to comment Share on other sites More sharing options...
sadness Posted May 25, 2013 Share Posted May 25, 2013 hi i have made a script but i still need help with imagesearch i have the dll in the windows System32 and SysWOW64 i have runed it as admin. Still not working (((( pls help me skype : sadrisadri215 sry 4 bad english thx sadness Link to comment Share on other sites More sharing options...
Queener Posted June 3, 2013 Share Posted June 3, 2013 link down. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
lpm Posted June 9, 2013 Share Posted June 9, 2013 Hi Folks, I'm a great fan of AutoIT. While trying to automate data entry into a java applet based ERP, I found that checking for entry error or success is quite a pain using pixelsearch. Instead, check for a data entry "success" or "failed" image is far simpler. This a feature found in AHK, I've cut out the necessary code and compiled it into a DLL, and written a au3 library around it. I've tested it in various XP and W2k3 machines, and it seems to work fine. It's a quick and dirty hack I did to get a job done, so your mileage may vary ImageSearch.zip (84K) Number of downloads: The ImageSearch.dll file does not exist anymore . Is there anybody who have it or a similar library for AutoIt? I really need this feature to automate the new Win 8 interface. So far I have used Sikuli but it is not a smart solution, difficult to maintain. /Lars /Lars Denmark www.lpmathiasen.com Automation and simplification is my game! Link to comment Share on other sites More sharing options...
Hyflex Posted June 10, 2013 Share Posted June 10, 2013 (edited) Lucky, I still have a backup of this See attached.However, I don't know how to get it working I'm constantly getting:if $result[0]="0" then return 0 if $result^ ERRORWhenever I run... (Line 40 of ImageSearch.au3)ImageSearch.zip Edited June 10, 2013 by Hyflex lpm and jvanegmond 2 Link to comment Share on other sites More sharing options...
lpm Posted June 12, 2013 Share Posted June 12, 2013 (edited) Lucky, I still have a backup of this Thanks a lot Hyflex. Edited June 12, 2013 by lpm /Lars Denmark www.lpmathiasen.com Automation and simplification is my game! Link to comment Share on other sites More sharing options...
tbodine88 Posted July 26, 2013 Share Posted July 26, 2013 When I try to register it in windows with: regsvr32.exe ImageSearchDLL.dll I get RegSvr32: The Module ImageSearchDLL.dll failed to load... tbodine Link to comment Share on other sites More sharing options...
Edano Posted July 27, 2013 Share Posted July 27, 2013 wow. such a hassle just to find a pic on the desktop to click on ??? and so many newbies posting here .... shocking [color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font] Link to comment Share on other sites More sharing options...
DeLorean Posted July 31, 2013 Share Posted July 31, 2013 (edited) @Edano, yes, in fact a newbie is having trouble finding something to click on! I am using some code snippets from previous posts here. For some reason, it won't find the image I'm trying to search for. I have attached the image I am searching for (it is a screenshot of the 'Edit' button in Notepad which is a .bmp image in my script directory, but the image uploader changed it to .png). Yes, I have opened Notepad and the title bar is within a 750x750 square from the top left corner. #AutoIt3Wrapper_UseX64=n #include <Array.au3> #include <ImageSearch.au3> ; ; Demo on the functions of ImageSearch ; MsgBox(0, "MSG", "You need to have an image visible on your screen") $x1 = 0 $y1 = 0 Global $result MsgBox(0, "MSG", "Search for image the top left corner in a 750x750 box") ; find image if it is in the top left corner of screen $result = _ImageSearchArea("notepadfile.bmp", 1,0,0,750,750, $x1, $y1, 0) If $result = 1 Then MouseMove($x1, $y1, 3) MsgBox(0, "Found", "Found the image in top left corner") Else MsgBox(0, "Néant", "Je n'ai pas trouvé l'image") EndIf I was also experiencing the same array issue that everyone else was having, and when the solutions I saw posted didn't work, I changed if ($result[] = "0") then return 0 to if ($result = "0") then return 0 Edited July 31, 2013 by DeLorean Link to comment Share on other sites More sharing options...
Kyokoshin Posted November 6, 2013 Share Posted November 6, 2013 is there a way to implement/load/use the dll in C#? I know thats not the right forum for this question, but i cant find any c#-solution thats work so fast. I tried with DLLImport and i got no errors. But if i want to load an image the programm exits without any errors. :/ If i try the 64bit-version (i found here) then it doesnt exits but i get the error "BadImageFormat". (have tried some formats but nothing changes xD) anyone a idea? Link to comment Share on other sites More sharing options...
itctravel Posted November 15, 2013 Share Posted November 15, 2013 I have tried to download the ZIP from posts #63 and 64, which I believe should be the most current. I get an error saying the ZIP is invalid or corrupted...any ideas? Link to comment Share on other sites More sharing options...
itctravel Posted November 18, 2013 Share Posted November 18, 2013 (edited) So, I had a copy of this from a couple months back and have been playing with it. I have discovered something very interesting. If the .dll is not located in the autoitInclude folder, the function doesn't work even after the script is compiled. I have tried it with the .dll in the windowssystem32 but no go. If I have the folder C:\Program Files\AutoIt3\Include\ present and have the .dll located there, it works! Is this an issue with the ImageSearch.au3? Since I plan on using this on computers that do not have AutoIt installed I am hoping to see if I can find the solution to the problem. I know that the compiller has a tab 'Res Add Files' and then a box for 'Extra Files'...I am not sure if I try putting the .dll there if that will help or not as I have not messed with that functionality to date and not quite sure what it is used for specifically. I will include some of my code just for refference in case I am not calling the function properly etc. I won't include all the code, just up until it trys to use _ImageSearch. Thanks in advance for any help with this!....UPDATE!! So I opened up the ImageSearch.au3 and I see the problem $result = DllCall("C:\Program Files\AutoIt3\Include\ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage) This is telling the program to look specifically at that location for the .dll!!! What is the best way to change that to specify the system folder for various OS? I know something with wildcard % etc? Hopefully this helps others too! Edited November 19, 2013 by itctravel Link to comment Share on other sites More sharing options...
milad0011988 Posted November 21, 2013 Share Posted November 21, 2013 I'm using image search and everything was running perfectly on my computer using win7 32bit and I finished my whole script and tested it as .exe and no errors until I compiled it and tried to test it on other computers then an error apeared "Error: subscript used with non-Array variable." both computes running 32bit version of windows 7 and xp I searched the forum and read all the comments in the post but i didn't find any solution for 32bit problem all the solutions related to using 64bit os please help I was working on my script for weeks and after i finished I face this problem #include <ImageSearch.au3> Global $x = 0 Global $y = 0 Global $sFldr1 = @DocumentsCommonDir & "\Files\" Do Local $startimage = _ImageSearch($sFldr1 & "\startimage.png", 1, $x, $y, 10) If $startimage = 0 Then Sleep(100) EndIf Until $startimage = 1 Sleep(500) the image and files are created and located where they supposed to be(@DocumentsCommonDirfilesstartimage.png) I tried all the solutions in the post but nothing work!!! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 21, 2013 Moderators Share Posted November 21, 2013 Based upon your previous entries, this wouldn't be startimage.png that comes with Legacy of Heroes would it. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
milad0011988 Posted November 21, 2013 Share Posted November 21, 2013 sorry I didn't get the point, what is "Legacy of Heroes"? and how this could help to fix the problem? any way this is the startimage.png: Link to comment Share on other sites More sharing options...
water Posted November 21, 2013 Share Posted November 21, 2013 (edited) I'm sure the subscript error would appear on your computer as well. If you could run your script on the other computer from SciTe you would get the line number where the error occurs. Edited November 21, 2013 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
milad0011988 Posted November 21, 2013 Share Posted November 21, 2013 (edited) This is the problem on my computer I have no error at all and every thing work fine. just give 5 min and I will install SciTe on the other computers and try and give you the result ok here the error on win7 32bit C:\Program Files\AutoIt3\Include\ImageSearch.au3 (40) : ==> Subscript used with non-Array variable.: if $result[0]="0" then return 0 if $result^ ERROR ->00:31:37 AutoIt3.exe ended.rc:1 >Exit code: 1 Time: 12.776 I researshed the post before the edit but I found no answer for 32bit all the sulotions for 64bit!!! ************************************************************************** I found the problem, it's in the UDF the function: DllCall("ImageSearchDLL.dll" it's not specified from where to call the dll i modified it and added intall dll file to the script with the same path of other files and it's working now but is there another method to call the dll file without installing it with other files I'll try to embed it in the script and call it from memory is there a better way? Edited November 21, 2013 by milad0011988 Link to comment Share on other sites More sharing options...
Recommended Posts