ProgAndy Posted November 25, 2008 Share Posted November 25, 2008 (edited) Hey. Great library. I just made some chages, so i can search any HBitmap, too ( _WinAPI_LoadImage, _GDIPlus_BitmapCreateHBITMAPFromBitmap) ImageSearch.zip (659.4K) Number of downloads: //Edit: added speedshare mirror as requested by mortelrdv: http://www.speedshare.org/download.php?id=5B284B0413Now it is here: Download for mod Edited November 18, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
comeonyoureds Posted December 13, 2008 Share Posted December 13, 2008 Hey. Great library. I just made some chages, so i can search any HBitmap, too ( _WinAPI_LoadImage, _GDIPlus_BitmapCreateHBITMAPFromBitmap) ImageSearch.zip (659.4K) Number of downloads: Hello! Any idea on how this works while looking for an image? I'm experiencing difficulties while looking for a certain cursor image.Does it look at the cursor while searching or behind it only?Thanks! Link to comment Share on other sites More sharing options...
ProgAndy Posted December 13, 2008 Share Posted December 13, 2008 (edited) No, i don't know, how this works... but i think, it looks behind the cursor (like _ScreenCapture_Capture, where the cursor is only added if you want it) //Edit: so you could use _ScreenCapture_Capture with the modified dll and the cursor would be there) Edited December 13, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
comeonyoureds Posted December 13, 2008 Share Posted December 13, 2008 No, i don't know, how this works... but i think, it looks behind the cursor (like _ScreenCapture_Capture, where the cursor is only added if you want it)//Edit: so you could use _ScreenCapture_Capture with the modified dll and the cursor would be there)Yes, I guess I could do that, but it would probably be too slow for my purpose.I need to look for an object in an area.And the object is dynamic, its graphic changes, so the only way to look for it in an area is move the cursor and look at its shape, because it changes shape while over that object.Capturing the image, saving it, and looking through that image for every let's say 5 pixels in a pretty large area would probably take too long...Maybe there's a different way I could look for the cursor though...Anyway, thanks for the fast answer! Link to comment Share on other sites More sharing options...
mortelrdv Posted December 17, 2008 Share Posted December 17, 2008 HelloCan you put ImageSearch.zip somewhere other than http://trashbin.nfshost.com ? because i can't get it.Thank Link to comment Share on other sites More sharing options...
smkr32b Posted December 18, 2008 Share Posted December 18, 2008 I've been working with ImageSearch for a few days on a project and thus far I've had great success until I tried to make it find a small image on a side monitor. It seems that imagesearch by default only searches on the primary monitor. Is there a way to expand it to look on all monitors? Thanks. Link to comment Share on other sites More sharing options...
ProgAndy Posted December 18, 2008 Share Posted December 18, 2008 (edited) Added a mirror fpr HBITMAP veriosn: http://www.speedshare.org/download.php?id=5B284B0413 Edited December 18, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
comeonyoureds Posted December 18, 2008 Share Posted December 18, 2008 Added a mirror fpr HBITMAP veriosn: http://www.speedshare.org/download.php?id=5B284B0413Hello! Came across an issue with imagesearcharea().It seems that even though I specify a search rectangle, it still looks at the whole screen, or at least at the full part of the screen that's to the right and down of the screen starting from the initial coordinates.Any ideas why?Thanks! Link to comment Share on other sites More sharing options...
mortelrdv Posted December 19, 2008 Share Posted December 19, 2008 Added a mirror fpr HBITMAP veriosn: http://www.speedshare.org/download.php?id=5B284B0413thank you Link to comment Share on other sites More sharing options...
jasny Posted December 21, 2008 Share Posted December 21, 2008 (edited) I have got error :!>13:53:19 AutoIT3.exe ended.rc:-1073741819on example code. Any solution ?EDIT: Yay didn't change dll file. Sorry EDIT2: Script is working fine! Great job for me.... But it would be brilliant if it could return array of all items found with ...coords of course. . Edited December 21, 2008 by jasny Link to comment Share on other sites More sharing options...
AndyCody Posted February 8, 2009 Share Posted February 8, 2009 (edited) Hi there Well I have an issue and I was wondering if any of you had ideas or answers. Let me explain you. I've been using ImageSearch.au3 UDF and it works like a charm on my Windows XP. However the script I made is for someone under Vista and I suspect this is the problem here since for her it simply doesn't work (from what I understood the script doesn't even start). So here are my thinkings, is there anything to do to make an autoit script compatible with Vista (I don't have Vista and don't even own a copy so I can't test :-( ) or is due to the ImageSearchDLL.dll not working on Vista ? and any idea how to make this work on Vista? the question has been asked in the thread but no answer yet Thank you! Edited February 8, 2009 by AndyCody Link to comment Share on other sites More sharing options...
techbard Posted February 10, 2009 Share Posted February 10, 2009 Hi thereWell I have an issue and I was wondering if any of you had ideas or answers. Let me explain you. I've been using ImageSearch.au3 UDF and it works like a charm on my Windows XP. However the script I made is for someone under Vista and I suspect this is the problem here since for her it simply doesn't work (from what I understood the script doesn't even start).So here are my thinkings, is there anything to do to make an autoit script compatible with Vista (I don't have Vista and don't even own a copy so I can't test :-( ) or is due to the ImageSearchDLL.dll not working on Vista ? and any idea how to make this work on Vista? the question has been asked in the thread but no answer yetThank you!ImageSearch.dll is working on WinVista in my case. Link to comment Share on other sites More sharing options...
scofield Posted February 15, 2009 Share Posted February 15, 2009 he finds also pictures 60*60 ? Link to comment Share on other sites More sharing options...
scofield Posted February 15, 2009 Share Posted February 15, 2009 here is the PIC Link to comment Share on other sites More sharing options...
Neelix Posted February 18, 2009 Share Posted February 18, 2009 Hallo, I use the ImageSearch function ang it works But I want use the ImageSearchDLL.dll for my Pythonproject and in this case i must register the dll. I try to register this file with the regsvr32 command but i get the error: "ImageSearchDLL.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered." It is possible that the author of the dll file modify this file? Link to comment Share on other sites More sharing options...
ProgAndy Posted February 18, 2009 Share Posted February 18, 2009 ImageSearch is a Win32 API DLL, not a COM-Dll. So you have to use ctypes *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Neelix Posted February 18, 2009 Share Posted February 18, 2009 ok i have the follow code: from ctypes import * mydll = CDLL('ImageSearchDLL.dll) imgSearch = mydll.ImageSearch and now, how can I use the function? When i type: result = imgSearch("img.bmp", 1, 0, 0, 0) i get a WindowsError: exception: access violation reading 0x00000000 Link to comment Share on other sites More sharing options...
chogan Posted March 9, 2009 Share Posted March 9, 2009 (edited) ok i have the follow code: from ctypes import * mydll = CDLL('ImageSearchDLL.dll) imgSearch = mydll.ImageSearch and now, how can I use the function? When i type: result = imgSearch("img.bmp", 1, 0, 0, 0) i get a WindowsError: exception: access violation reading 0x00000000 This works for me. from ctypes import * import win32api ImageSearchDLL = windll.LoadLibrary("ImageSearchDll") ImageSearch = ImageSearchDLL.ImageSearch imageFile = 'myImage.bmp' searchReturn = c_char_p(ImageSearch(0,0,1024,1024,imageFile)) print search_return #shows c_char_p representation print repr(string_at(search_return,21)) #shows string representation, need to fix the 21 to some sort of str_len function Edited March 9, 2009 by chogan Link to comment Share on other sites More sharing options...
dkrichun Posted March 22, 2009 Share Posted March 22, 2009 (edited) ImageSearch.au3 not work under Windows 7 x64 if AutoIt3_x64.exe used! ERROR Line 40 ...ImageSearch.au3 if $result[0]="0" then return 0 if $result^ ERROR Error: Subscript used with non-Array variable If run under AutoIt3.exe - all ok! Edited March 22, 2009 by dkrichun Link to comment Share on other sites More sharing options...
Reinn Posted May 25, 2009 Share Posted May 25, 2009 #include <ImageSearch.au3> $x1=0 $y1=0 $result = _ImageSearch("recycle.bmp",1,$x1,$y1,0) if $result=1 Then MouseMove($x1,$y1,3) MsgBox(0,"Found","Found a recycle bin with stuff here...") EndIf $result = _ImageSearchArea("recycle.bmp",1,0,0,200,200,$x1,$y1,0) if $result=1 Then MouseMove($x1,$y1,3) MsgBox(0,"Found","Found a recycle bin with stuff in top left corner") EndIfThe reason to that only this is working, is that While 1 Sleep(1000) WEnd will make the bot sleep 1000 MS all the time, which means it doesn't get to do other things. Why did you add it in your code in the first place? Completely useless Btw. Thanks, will try this out! Link to comment Share on other sites More sharing options...
Recommended Posts