ElPandaRojo1 Posted October 22, 2021 Posted October 22, 2021 Hello, I have a problem, and I still can't find how to do the following, is to look for an example image of the autoit icon within another image, it could be the image of a desktop screenshot but sending the image myself, but I can't find anything that I can help with this, I already tried the libraries: 'ImageSearch.au3', '_ImageSearch_UDF.au3', 'HandleImgSearch.au3', but none of these do this, they always do it with the desktop screenshot without being able to select which image in specific. I also found this but in the same way it does not work for me, I run it normally and it always returns the same, this or not the image of the calculator on the screen. I appreciate if you can help me with this.
Gianni Posted October 23, 2021 Posted October 23, 2021 have you tried this yet? Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
ElPandaRojo1 Posted October 29, 2021 Author Posted October 29, 2021 I check it but it does not work until the call of this function: ;Find first pixel that is diffrent than ....the first pixel Func _FindFirstDiff($tPix) ;####### (BinaryStrLen = 106) ######################################################################################################################## Static Local $Opcode = '0xC80000008B5D0C8B1383C3048B4D103913750C83C304E2F7B800000000EB118B5508FF338F028B451029C883C002EB00C9C20C00' Static Local $aMemBuff = DllCall("kernel32.dll", "ptr", "VirtualAlloc", "ptr", 0, "ulong_ptr", BinaryLen($Opcode), "dword", 4096, "dword", 64) Static Local $tMem = DllStructCreate('byte[' & BinaryLen($Opcode) & ']', $aMemBuff[0]) Static Local $fSet = DllStructSetData($tMem, 1, $Opcode) ;##################################################################################################################################################### Local $iMaxLoops = (DllStructGetSize($tPix) / 4) - 1 Local $aRet = DllCallAddress('dword', DllStructGetPtr($tMem), 'dword*', 0, 'struct*', $tPix, 'dword', $iMaxLoops);On this exact line Return $aRet EndFunc ;==>_FindFirstDiff And then it throws me this error: !>12:21:20 AutoIt3.exe ended.rc:-1073741819 It seems that it stays in an infinite loop or an infinite function call, and the program closes, I am using exactly the same example code that is in the documentation.
Nine Posted October 30, 2021 Posted October 30, 2021 It is quite simple in fact. You just need to create two 2D arrays and search for one array being part of the second array. See _GDIPlus_BitmapLockBits to understand how to create an array from any image source. Of course it will depend how fast you need to achieve this... “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
junkew Posted October 31, 2021 Posted October 31, 2021 https://www.autoitscript.com/wiki/FAQ#How_can_I_search_an_image_in_another_image.3F FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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