KutayAltinoklu Posted August 20, 2015 Share Posted August 20, 2015 I just got it to work!I was having much trouble, reading all the threads and posts related to ImageSearch, and I'd like to help others now.Now got it to work as a x64 and also as a x32 script using both DLLs accordingly (on a Windows 8.1 x64 PC)One of the steps I took in debugging was putting this into (the top of) my script:$sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system. ConsoleWrite("$sOSArch=" & $sOSArch & @CR) $sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt. ConsoleWrite("$sAutoItX64=" & $sAutoItX64 & @CR)In any case you want to be consistent about 32bit or 64bit usage, and use the right DLL etc.What also really helped was putting in lots of debugging and error handling to zoom in on whatever specific part isn't working and why.Credits to Centrally (very helpful usage explanation and re-uploading the files) and kangkeng for making this possible in AutoIt, as well Miguel7 from the AutoHotKey forum who also posted some helpful advice.I've attached a zipped folder containing all of the needed Dlls and my customised Library, which also contains an example and some debugging: ImageSearch2015.zipTake a look inside ImageSearch2015.au3 here if you like:Hidden ContentEdit: also uploaded "ImageSearch15.au3", a version of "my" ImageSearch Library without the built-in Example and Debugging(will require the Dlls in the .zip file though): ImageSearch15.au3Hidden ContentI hope this helps somebody! Let me know any feedback/issues.Thank You Very Much You Just Saved My Life I Have Signed Up To Say Thank You But I Think I Love Autoit So I will use my account to. guestscripter, truonghieuhust, ALEJANDROMAZO and 1 other 4 Link to comment Share on other sites More sharing options...
KutayAltinoklu Posted August 20, 2015 Share Posted August 20, 2015 (edited) Sorry For Posting Twice. Edited August 20, 2015 by KutayAltinoklu Posting Twice Link to comment Share on other sites More sharing options...
mohanraj8690 Posted August 21, 2015 Share Posted August 21, 2015 (edited) Here is simple script working fine.#include <ImageSearch.au3>$x1=0$y1=0MsgBox(0,"start","start")do$result = _ImageSearch("C:\Users\a-mrayappa\Desktop\ImageSearch\filetrans\1.png",1,$x1,$y1,0)until $result = 1;if $result=1 Then MouseMove($x1,$y1,3) MouseClick("left", $x1,$y1, 1) WinWait("[Title:TightVNC File Transfer]", "", 10) else MsgBox(0,"MSG","End")EndIfEndFunc Make Sure your running script in the same folder of your imagesearch library package file extracted folder. I have enclosed imagesearch library zip file extract and use it. It works in 32 and 64 bit both. Have fun with AUTOIT. ImageSearch.zip Edited August 21, 2015 by mohanraj8690 Link to comment Share on other sites More sharing options...
xhuyvn Posted August 25, 2015 Share Posted August 25, 2015 i want find image in a window, any suggest? how can i do it? Link to comment Share on other sites More sharing options...
Enzo22 Posted September 10, 2015 Share Posted September 10, 2015 Hi, i am new and i am trying to use image search to start a program from the start menu, however it isn't working keeps telling me the image wasn't found. Can someone help me please ?!#include <file.au3>#include <ImageSearch2.au3>Func ClickOnImage($sImageName) Local $x = -1 Local $y = -1 Local $ImageFound = _ImageSearch($sImageName, 0, $x, $y, 100) If ($x <> -1 And $y <> -1) Then MouseMove($x, $y, 10) MouseClick("left", $x, $y) Else MsgBox(0, "Image not found", "The image " & $sImageName & " was not found") Return 0 EndIf Return 1EndFunc ;==>ClickOnImageFunc D()EndFuncFunc OpenPaint() ClickOnImage("Image\Start.bmp") Sleep(250) ClickOnImage("Image\Paint.bmp")EndFuncOpenPaint() Link to comment Share on other sites More sharing options...
BrewManNH Posted September 10, 2015 Share Posted September 10, 2015 That's probably one of the worst reasons for using ImageSearch I've seen yet. Why not just run the shortcut, or run the program directly? 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...
BrewManNH Posted September 10, 2015 Share Posted September 10, 2015 (edited) Deleted Edited September 11, 2015 by KingBob Accidental double post 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...
Enzo22 Posted September 11, 2015 Share Posted September 11, 2015 it is only an example for testing Link to comment Share on other sites More sharing options...
BrewManNH Posted September 11, 2015 Share Posted September 11, 2015 it is only an example for testing It's still a bad example to try and use this function for. You'd have to have the function keep looping because it will only run once, and you can't run it and have the start menu open at the same time. 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...
Enzo22 Posted September 14, 2015 Share Posted September 14, 2015 oh okay thanks well i solved my problem i had to compile it in X86 instead of X64 for the image search to work.I am wondering if we can search for strings and then click on the right string ? Link to comment Share on other sites More sharing options...
automit Posted October 12, 2015 Share Posted October 12, 2015 Edit: also uploaded "ImageSearch15.au3", a version of "my" ImageSearch Library without the built-in Example and Debugging(will require the Dlls in the .zip file though): ImageSearch15.au3good work - but - is this link down? I don't get anything Link to comment Share on other sites More sharing options...
automit Posted October 14, 2015 Share Posted October 14, 2015 I've attached a zipped folder containing all of the needed Dlls and my customised Library, which also contains an example and some debugging: ImageSearch2015.zipTake a look inside ImageSearch2015.au3 here if you like:I hope this helps somebody! Let me know any feedback/issues. Can anyone show a simple example, which are the new DLLs really needed me?How to use the new DLL properly and how to tie this one? I would like to use image search with the new DLLs. Therefore, a simple example would be great - based on the new files, and if you need the accompanying ImageSearch2015.au3 (in directory include?) or only the dlls. Do one of the files in the include directory? What really is needed? What is a simple example AU3?ImageSearchDLLx64.dll (the 64er DLL is from 2012)msvcr110.dllmsvcr110d.dll(Please note: this is an automatic translation.) Link to comment Share on other sites More sharing options...
F0 Posted December 7, 2015 Share Posted December 7, 2015 I just got it to work!I was having much trouble, reading all the threads and posts related to ImageSearch, and I'd like to help others now.Now got it to work as a x64 and also as a x32 script using both DLLs accordingly (on a Windows 8.1 x64 PC)One of the steps I took in debugging was putting this into (the top of) my script:$sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system. ConsoleWrite("$sOSArch=" & $sOSArch & @CR) $sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt. ConsoleWrite("$sAutoItX64=" & $sAutoItX64 & @CR)In any case you want to be consistent about 32bit or 64bit usage, and use the right DLL etc.What also really helped was putting in lots of debugging and error handling to zoom in on whatever specific part isn't working and why.Credits to Centrally (very helpful usage explanation and re-uploading the files) and kangkeng for making this possible in AutoIt, as well Miguel7 from the AutoHotKey forum who also posted some helpful advice.I've attached a zipped folder containing all of the needed Dlls and my customised Library, which also contains an example and some debugging: ImageSearch2015.zipTake a look inside ImageSearch2015.au3 here if you like:Hidden ContentEdit: also uploaded "ImageSearch15.au3", a version of "my" ImageSearch Library without the built-in Example and Debugging(will require the Dlls in the .zip file though): ImageSearch15.au3Hidden ContentI hope this helps somebody! Let me know any feedback/issues.Thanks so much! got it working. win10 x64 7.12.15 Link to comment Share on other sites More sharing options...
Chiitus Posted March 2, 2016 Share Posted March 2, 2016 On 08/08/2015 at 3:31 AM, guestscripter said: I just got it to work! I was having much trouble, reading all the threads and posts related to ImageSearch, and I'd like to help others now. Now got it to work as a x64 and also as a x32 script using both DLLs accordingly (on a Windows 8.1 x64 PC) One of the steps I took in debugging was putting this into (the top of) my script: $sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system. ConsoleWrite("$sOSArch=" & $sOSArch & @CR) $sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt. ConsoleWrite("$sAutoItX64=" & $sAutoItX64 & @CR) In any case you want to be consistent about 32bit or 64bit usage, and use the right DLL etc. What also really helped was putting in lots of debugging and error handling to zoom in on whatever specific part isn't working and why. Credits to Centrally (very helpful usage explanation and re-uploading the files) and kangkeng for making this possible in AutoIt, as well Miguel7 from the AutoHotKey forum who also posted some helpful advice. I've attached a zipped folder containing all of the needed Dlls and my customised Library, which also contains an example and some debugging: ImageSearch2015.zip Take a look inside ImageSearch2015.au3 here if you like: Hidden Content Edit: also uploaded "ImageSearch15.au3", a version of "my" ImageSearch Library without the built-in Example and Debugging (will require the Dlls in the .zip file though): ImageSearch15.au3 Hidden Content I hope this helps somebody! Let me know any feedback/issues. Seriously man, internet and a lot of users are so FUCKING AMAZING HOLY SHIT, HOLY FUCKING SHOT! Thanks so much! Seriously, thank you! This new version is working in WINDOWS 10 X64. Thankssss!! Link to comment Share on other sites More sharing options...
dwedwe Posted March 5, 2016 Share Posted March 5, 2016 why is this happening? "missing separator character before keyword" Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 5, 2016 Moderators Share Posted March 5, 2016 dwedwe, Put spaces before the ByRef keyword in the function definition lines - or download a later version of Au3Check which fixes this problem. 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...
dwedwe Posted March 6, 2016 Share Posted March 6, 2016 Thanks Melba ♥♥♥ Link to comment Share on other sites More sharing options...
Hawksfire Posted April 15, 2016 Share Posted April 15, 2016 (edited) EDIT: I finally got it! Here are my tips: I couldn't download ImageSearch15.au3 (the one that's not part of the zip) In ImageSearch2015.au3, there is an Exit statement that needs to be moved inside the If block! If AutoIt is crashing, look at your ImageSearch file and delete any reference to the variable $HBMP In Windows 10, instead of being able to select a screen resolution it now has a zoom amount...? Set that to 100% or else it may not work and may give you incorrect $x and $y coordinates Edited April 17, 2016 by Hawksfire Link to comment Share on other sites More sharing options...
Zero_T Posted April 21, 2016 Share Posted April 21, 2016 On 8/8/2015 at 8:31 AM, guestscripter said: I just got it to work! I was having much trouble, reading all the threads and posts related to ImageSearch, and I'd like to help others now. Now got it to work as a x64 and also as a x32 script using both DLLs accordingly (on a Windows 8.1 x64 PC) *** snip*** Hidden Content I hope this helps somebody! Let me know any feedback/issues. Worked for me, on Win7 32bits. Thanks MsgBox('','',(StringFromASCIIArray(StringSplit('13:65:108:108:32:116' _ &':104:111:115:101:32:109:111:109:101:110:116:115:32:119:105:108:108' _ &':32:98:101:32:108:111:115:116:32:105:110:32:116:105:109:101:44:32:' _ &'108:105:107:101:32:116:101:97:114:115:32:105:110:32:114:97:105:110' _ &':46:32:84:105:109:101:32:116:111:32:100:105:101:46:13',":",2)))) Link to comment Share on other sites More sharing options...
dont_panic Posted May 2, 2016 Share Posted May 2, 2016 Link for ImageSearch15.au3 is not working! 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