Jump to content

Search the Community

Showing results for tags 'image search'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 8 results

  1. Today, I will share my work with image search in inactive windows (windows that run in the background) with tolerances (variations). After a long time of searching and using image search UDF on the internet. I combined all of that with my experienced and created a UDF name HandleImgSearch. I have embedded the .dll file in this script so it doesn't need any external files, just include it and run. However, this UDF uses a pure AutoIT loop to make the multiple positions returned work so it may be slower if you set the $MaxImg to a high number. Some highlights: Very fast with imagesearchdll embedded, no external files required. Tolerances and Max Images are supported. Optimized. Use with a handle or full screen easily. Included global functions, so you can run multiple functions in one capture. Examples used for testing included. Notes: Only used to compile to 32-bit AutoIt version (It can completely run on Windows 64-bit) The image used for searching should be in a "24-bit Bitmap" format. I included the $IsUser32 variable in some places like _GlobalImgInit, _HandleCapture. This variable allowed you to use DllCall with the "PrintWindow" parameter instead of _WinAPI_BitBlt with $SRCCOPY. $IsUser32 = True is useful for the window explorer handle, $IsUser32 = False is useful for the emulator handle (NoxPlayer handle example included). If hwnd parameter equals "", it will use the whole screen instead. Functions: Global Functions: Run multiple functions with one capture. _GlobalImgInit: Initialization variables. _GlobalImgCapture: Capture the handle. _GlobalGetBitmap: Get captured bitmap handle. _GlobalImgSearch: This is the main function of this UDF. _GlobalGetPixel: Get pixel color in the captured image. _GlobalPixelCompare: Compare pixel color with captured image pixel color. Handle Functions: Capture every time. _HandleImgSearch: This is the main function of this UDF. Search for images in the handle of the window with the tolerance and maximum image options. _BmpImgSearch: Search the picture in the picture instead of the handle. _HandleGetPixel: Get pixel in the handle image. _HandlePixelCompare: Compare color with pixel color of handle image. _HandleCapture: Capture handle screen. Source code: v1.0.5 (First release): https://github.com/vnniz/HandleImgSearch/releases/tag/v1.0.5 v2.0.0 (14/04/2023): https://github.com/vnniz/HandleImgSearch/releases/tag/v2.0.0 Thanks to: ImageSearchDLL (Author: kangkeng 2008) MemoryCall (Author: Joachim Bauch) BinaryCall (Author: Ward) GAMERS - Asking for help with ANY kind of game automation is against the forum rules. DON'T DO IT.
  2. Hey, I know the title sounds weird, but i couldn't find better words for it... I finally managed to have a working image search (yes yes i know image search is evil :p). I noticed that even if the script is compiled, the images have to be in my script folder. But i don't want that the images i'm searching for on the screen can be viewed, edited etc by every user. Is there a way to... uhm... put them in a file like .rar, but one that can't be easily opened? 🤔 Edit: Now that i think of .rar, maybe using a .rar which is protected by a password... Can autoit search, open, extract, use and delete that? (I guess so, I didn't search for this yet, going to google that asap)
  3. Hi guys, Some functions of my script are running slowly. Very slow. What is the reason? My Code: <snip>
  4. Howdy, I've gone through a lot of au3 forums, and I once had a working Imagesearch script that I got from here. However, and i'm just totally not sure how but my imagesearch scripts aren't working anymore. I'm not new to au3 but i'm not the most experienced with it's syntax/commands. Anyways, I've looked over the big threads involving imagesearch. Does anyone have a working Imagesearch x64 for win10 that is currently working as of the date with the post. Dll's and what not is fine, just when I tell the script to run, I want to be able to find the image on the screen! Can't find a working copy so if anyone has one please send it my way lol. I've taken all the imagesearch downloads and what not and have played with them but I can't get any of them working on my end, despite others saying they're working. Thanks.
  5. Func dg_get_images() $x1=0 $y1=0 ;MsgBox(0,"start","start") do $result = _ImageSearch("C:\Users\Server\Desktop\my project\image.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) EndIf this code works when i search the image, but when i change the location of the desktop icon it can't find the desktop icon anymore. i wanna try image search area. but i don't know how to use it because i cant understand the parameter for the image search area. please help me how to solve it thank you in advance.
  6. Hello. I've been working with Imagesearch library lately and it did a good work, although I moved to a new PC and didn't copy the old files with me so I downloaded the Imagesearch from the following post hoping that it will work. It doesn't though. First time I when I use (run as subscript to my code) the Imagesearch.au3, Scite finds errors (missing spaces). Ctrl+T (scite tidy) fixes these missing spaces but the script returns the following error on every run after: _ImageSearch('search.bmp', 0, $x, $y, 0) outputs "C:\Users\Knuckles\Desktop\AutoIt\include\ImageSearch.au3" (44) : ==> Subscript used on non-accessible variable.: If $result[0] = "0" Then Return 0 If $result^ ERROR no matter if I put the searched bmp in the script folder or folder img in the script directory. Also, it doesn't matter if the searched image on screen or not, it returns the same. Can you provide me any help please? I remember having these problems 2 years ago when I first met the imagesearch library also (I fixed it somehow though in that time). Seems nothing changed. Using this version posted in the following post gives the same error: Also I run windows 10 64bit and I have no shell options for script editing, running as x86 or whatever as I used to have on windows xp/7. I went through some steps like deleting a key in registry and I even reinstalled autoit and scite but that only resulted to au3 as unrecognized file format and not in getting back the menus and the icon on au3 files. Any thoughts on this? Edit: Installing 64-bit AutoIt and using 64bit ImageSearch is no change. code.au3 FOUND WORKING: http://www.codebot.de/index.php/Thread/12713-Imagesearch-au3-funktioniert-nicht/ but why is this one working and the original aren't? :(
  7. Why is it giving me and error when i do the ImageSearch, The bmp is in the same location as the Script so why is it doing this? Error Below $result = _ImageSearch('gift.bmp',1,$x,$y,100) $result = _ImageSearch('gift.bmp',1,^ ERRORScript Below #include <ImageSearch.au3> HotKeySet("{ENTER}","start") While 1 Sleep(1) WEnd Func start() While 1 $result = _ImageSearch('gift.bmp',1,$x,$y,100) If $result = 1 Then MouseClick("Left",$x,$y,1,10) EndIf WEnd EndFunc
  8. description: search image in desktop / picture. not require dll. include: myImageSearch.au3 #include-once #include <ScreenCapture.au3> ; #INDEX# ======================================================================================================================= ; Title .........: myImageSearch ; AutoIt Version: 3.3.6.1 ; Script Version: 1.0 (31.10.2011) ; Language: English, Polski. ; Description: Search image. ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; myImageSearch_Desktop ; myImageSearch_Picture ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: myImageSearch_Desktop ; Description ...: Znajdz obrazek na pulpicie. ; Syntax.........: myImageSearch_Desktop($Image, $x = 0, $y = 0, $iIW = @DesktopWidth, $iIH = @DesktopHeight, $TransColorRGB = '', $OnlyFirst = True) ; Parameters ....: $Image - znajdz obrazek: adres do szuaknego obrazka, lub bitmapa (format .bmp 24-bit) ; $x - lewe koordynaty [Default is 0 (pierwszy pixel).] ; $y - gorne koordynaty. [Default is 0 (pierwszy pixel).] ; $iIW - prawe koordynaty. [Default is @DesktopWidth.] ; $iIH - dolne koordynaty. [Default is @DesktopHeight.] ; $TransColorRGB - Kolor przezroczystosci / Ignorowany kolor. Musi byc string i format RGB. a.g: "0xFFFFFF".[Default is "".] ; $OnlyFirst - [Default is True.] ; |True = Success: Zwraca tablice 2-elementowa z koordynatami. ; $array[0] = x koordynaty ; $array[1] = y koordynaty ; |False = Success: Zwraca 2D tablice z koordynatami. ; $array[0][0] = 1st x coordinate ; $array[0][1] = 1st y coordinate ; $array[1][0] = 2nd x coordinate ; $array[1][1] = 2nd y coordinate ; $array[3][0] = 3rd x coordinate ; $array[3][1] = 3rd y coordinate ; $array[n][0] = nth x coordinate ; $array[n][1] = nth y coordinate ; ; UWAGA: Jesli uzyjesz "False" to max obszar przeszukiwania moze wynosic 800x600 pixeli, lub ekwiwalent max 480.000 pixeli!!! ; Nie wiecej. ; ; Return values . : On Success - Zwrot tablica 2-elementowa z koordynatami lub 2D tablica z koordynatami. ; On Failure - @Error = 1 - Sciezka do pliku jest bledna, lub bitmapa/obrazek jest bledna. ; @Error = 2 - Obrazka nie znaleziono (na pulpicie). ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: myImageSearch_Desktop ; Description ...: Image search in desktop. ; Syntax.........: myImageSearch_Desktop($Image, $x = 0, $y = 0, $iIW = @DesktopWidth, $iIH = @DesktopHeight, $TransColorRGB = '', $OnlyFirst = True) ; Parameters ....: $Image - search image: string adress for file, or bitmat (format .bmp 24-bit) ; $x - left coordinate. [Default is 0 (first pixel).] ; $y - top coordinate. [Default is 0 (first pixel).] ; $iIW - right coordinate. [Default is @DesktopWidth.] ; $iIH - bottom coordinate. [Default is @DesktopHeight.] ; $TransColorRGB - Color transparancy / Ignore color. Must be string and format RGB. a.g: "0xFFFFFF".[Default is "".] ; $OnlyFirst - [Default is True.] ; |True = Success: Returns a two-element array coordinates. ; $array[0] = x coordinate ; $array[1] = y coordinate ; |False = Success: Returns a 2D array coordinates. ; $array[0][0] = 1st x coordinate ; $array[0][1] = 1st y coordinate ; $array[1][0] = 2nd x coordinate ; $array[1][1] = 2nd y coordinate ; $array[3][0] = 3rd x coordinate ; $array[3][1] = 3rd y coordinate ; $array[n][0] = nth x coordinate ; $array[n][1] = nth y coordinate ; ; ATTENTION: If u use "False" max area for search must be 800x600 pixels, or equivalent maximal 480.000 pixels!!! ; No more. ; ; Return values . : On Success - Returns two-element array coordinates, or 2D array coordinates. ; On Failure - @Error = 1 - Path not found or invalid image/bitmap. ; @Error = 2 - Image not exist (in desktop). ; =============================================================================================================================== Func myImageSearch_Desktop($Image, $x = 0, $y = 0, $iIW = @DesktopWidth, $iIH = @DesktopHeight, $TransColorRGB = '', $OnlyFirst = True) Local $hBMP, $hImage1, $aReturn, $error, $i _GDIPlus_Startup() $hBMP = _ScreenCapture_Capture("", $x, $y, $iIW + $x, $iIH + $y, False) $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP($hBMP) $aReturn = myImageSearch_Picture($hImage1, $Image, 0, 0, $iIW, $iIH, $TransColorRGB, $OnlyFirst) $error = @error _GDIPlus_ImageDispose($hImage1) _WinAPI_DeleteObject($hBMP) _GDIPlus_Shutdown() Switch $error Case 0 If $OnlyFirst Then $aReturn[0] += $x $aReturn[1] += $y Else For $i = 0 To UBound($aReturn, 1) - 1 $aReturn[$i][0] += $x $aReturn[$i][1] += $y Next EndIf Return $aReturn Case 2 Return SetError(1, 1, '') Case Else Return SetError(2, 2, '') EndSwitch EndFunc ;==>myImageSearch_Desktop ; #FUNCTION# ==================================================================================================================== ; Name...........: myImageSearch_Picture ; Description ...: Znajdz obrazek na obrazku. ; Syntax.........: myImageSearch_Picture($hImage1, $hImage2, $x = 0, $y = 0, $iIW = 0, $iIH = 0, $TransColorRGB = '', $OnlyFirst = True) ; Parameters ....: $hImage1 - bazowy obrazek: adres do szuaknego obrazka, lub bitmapa (format .bmp 24-bit) ; $hImage2 - znajdz obrazek: adres do szuaknego obrazka, lub bitmapa (format .bmp 24-bit) ; $x - lewe koordynaty [Default is 0 (pierwszy pixel).] ; $y - gorne koordynaty. [Default is 0 (pierwszy pixel).] ; $iIW - prawe koordynaty. [Default is 0 (0 to ostani pixel (caly obrazek).] ; $iIH - dolne koordynaty. [Default is 0 (0 to ostani pixel (caly obrazek).] ; $TransColorRGB - Kolor przezroczystosci / Ignorowany kolor. Musi byc string i format RGB. a.g: "0xFFFFFF".[Default is "".] ; $OnlyFirst - [Default is True.] ; |True = Success: Zwraca tablice 2-elementowa z koordynatami. ; $array[0] = x koordynaty ; $array[1] = y koordynaty ; |False = Success: Zwraca 2D tablice z koordynatami. ; $array[0][0] = 1st x coordinate ; $array[0][1] = 1st y coordinate ; $array[1][0] = 2nd x coordinate ; $array[1][1] = 2nd y coordinate ; $array[3][0] = 3rd x coordinate ; $array[3][1] = 3rd y coordinate ; $array[n][0] = nth x coordinate ; $array[n][1] = nth y coordinate ; ; UWAGA: Jesli uzyjesz "False" to max obszar przeszukiwania moze wynosic 800x600 pixeli, lub ekwiwalent max 480.000 pixeli!!! ; Nie wiecej. ; ; Return values . : On Success - Zwrot tablica 2-elementowa z koordynatami lub 2D tablica z koordynatami. ; On Failure - @Error = 1 - 1 sciezka do pliku jest bledna, lub bitmapa/obrazek jest bledna. ; @Error = 2 - 2 sciezka do pliku jest bledna, lub bitmapa/obrazek jest bledna. ; @Error = 3 - Obrazka nie znaleziono (na obrazku). ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: myImageSearch_Picture ; Description ...: Image search in picture. ; Syntax.........: myImageSearch_Picture($hImage1, $hImage2, $x = 0, $y = 0, $iIW = 0, $iIH = 0, $TransColorRGB = '', $OnlyFirst = True) ; Parameters ....: $hImage1 - base image: string adress for file, or bitmat (format .bmp 24-bit) ; $hImage2 - search image: string adress for file, or bitmat (format .bmp 24-bit) ; $x - left coordinate. [Default is 0 (first pixel).] ; $y - top coordinate. [Default is 0 (first pixel).] ; $iIW - right coordinate. [Default is 0 (0 is last pixel (full imege).] ; $iIH - bottom coordinate. [Default is 0 (0 is last pixel (full imege).] ; $TransColorRGB - Color transparancy / Ignore color. Must be string and format RGB. a.g: "0xFFFFFF".[Default is "".] ; $OnlyFirst - [Default is True.] ; |True = Success: Returns a two-element array coordinates. ; $array[0] = x coordinate ; $array[1] = y coordinate ; |False = Success: Returns a 2D array coordinates. ; $array[0][0] = 1st x coordinate ; $array[0][1] = 1st y coordinate ; $array[1][0] = 2nd x coordinate ; $array[1][1] = 2nd y coordinate ; $array[3][0] = 3rd x coordinate ; $array[3][1] = 3rd y coordinate ; $array[n][0] = nth x coordinate ; $array[n][1] = nth y coordinate ; ; ATTENTION: If u use "False" max area for search must be 800x600 pixels, or equivalent maximal 480.000 pixels!!! ; No more. ; ; Return values . : On Success - Returns two-element array coordinates, or 2D array coordinates. ; On Failure - @Error = 1 - 1st path not found or invalid image/bitmap. ; @Error = 2 - 2nd path not found or invalid image/bitmap. ; @Error = 3 - Image not exist (in picture). ; =============================================================================================================================== Func myImageSearch_Picture($hImage1, $hImage2, $x = 0, $y = 0, $iIW = 0, $iIH = 0, $TransColorRGB = '', $OnlyFirst = True) Local $testiIW, $testiIH Local $hBitmap1, $Reslt, $width, $height, $stride, $format, $Scan0 Local $iIW_2, $iIH_2, $hBitmap2, $Reslt2, $width2, $height2, $stride2, $format2, $Scan02 Local $sREResult1, $sREResult2, $sREResult3 _GDIPlus_Startup() If IsString($hImage1) Then $hImage1 = _GDIPlus_ImageLoadFromFile($hImage1) EndIf $testiIW = _GDIPlus_ImageGetWidth($hImage1) $testiIH = _GDIPlus_ImageGetHeight($hImage1) If $hImage2 = "" Or $testiIW = 0 Or $testiIH = 0 Then Return SetError(1, 1, '') EndIf If $iIW = 0 Or $testiIW < $iIW Then $iIW = $testiIW If $iIH = 0 Or $testiIH < $iIH Then $iIH = $testiIH $hBitmap1 = _GDIPlus_BitmapCloneArea($hImage1, 0, 0, $iIW, $iIH, $GDIP_PXF32ARGB) $Reslt = _GDIPlus_BitmapLockBits($hBitmap1, $x, $y, $iIW - $x, $iIH - $y, BitOR($GDIP_ILMREAD, $GDIP_ILMWRITE), $GDIP_PXF32ARGB) $width = DllStructGetData($Reslt, "width") $height = DllStructGetData($Reslt, "height") $stride = DllStructGetData($Reslt, "stride") $format = DllStructGetData($Reslt, "format") $Scan0 = DllStructGetData($Reslt, "Scan0") $sREResult1 = DllStructCreate("byte[" & $height * $width * 4 & "]", $Scan0); Create DLL structure for all pixels $sREResult1 = DllStructGetData($sREResult1, 1) _GDIPlus_BitmapUnlockBits($hBitmap1, $Reslt); releases the locked region _GDIPlus_ImageDispose($hImage1) _GDIPlus_ImageDispose($hBitmap1) If IsString($hImage2) Then $hImage2 = _GDIPlus_ImageLoadFromFile($hImage2) EndIf $iIW_2 = _GDIPlus_ImageGetWidth($hImage2) $iIH_2 = _GDIPlus_ImageGetHeight($hImage2) If $hImage2 = "" Or $iIW_2 = 0 Or $iIH_2 = 0 Then Return SetError(2, 2, '') EndIf $hBitmap2 = _GDIPlus_BitmapCloneArea($hImage2, 0, 0, $iIW_2, $iIH_2, $GDIP_PXF32ARGB) $Reslt2 = _GDIPlus_BitmapLockBits($hBitmap2, 0, 0, $iIW_2, $iIH_2, BitOR($GDIP_ILMREAD, $GDIP_ILMWRITE), $GDIP_PXF32ARGB) $width2 = DllStructGetData($Reslt2, "width") $height2 = DllStructGetData($Reslt2, "height") $stride2 = DllStructGetData($Reslt2, "stride") $format2 = DllStructGetData($Reslt2, "format") $Scan02 = DllStructGetData($Reslt2, "Scan0") $sREResult2 = DllStructCreate("byte[" & $height2 * $width2 * 4 & "]", $Scan02); Create DLL structure for all pixels $sREResult2 = DllStructGetData($sREResult2, 1) _GDIPlus_BitmapUnlockBits($hBitmap2, $Reslt2); releases the locked region _GDIPlus_ImageDispose($hImage2) _GDIPlus_ImageDispose($hBitmap2) _GDIPlus_Shutdown() $sREResult1 = StringTrimLeft($sREResult1, 2) $sREResult2 = StringTrimLeft($sREResult2, 2) If IsString($TransColorRGB) Then ; ignore color $TransColorRGB = StringRegExpReplace($TransColorRGB, "0x(.{2})(.{2})(.{2})", "\3\2\1FF") If $TransColorRGB Then $sREResult2 = StringRegExpReplace($sREResult2, "(.{8})", "\1 ") $sREResult2 = StringReplace($sREResult2, $TransColorRGB, "........") $sREResult2 = StringReplace($sREResult2, " ", "") EndIf EndIf ;ConsoleWrite($sREResult2 & @CRLF) $sREResult2 = StringRegExpReplace($sREResult2, "(.{" & $iIW_2 * 8 & "})", "\\Q\1\\E.\{" & ($iIW - $iIW_2) * 8 & "\}") $sREResult2 = StringTrimRight($sREResult2, StringLen(($iIW - $iIW_2) * 8) + 3) ;ConsoleWrite($sREResult2 & @CRLF) If $TransColorRGB Then $sREResult2 = StringReplace($sREResult2, "........", "\E........\Q") $sREResult2 = StringReplace($sREResult2, "\Q\E", "") $sREResult2 = StringRegExpReplace($sREResult2, "([.}{\w]*)([\\].*[E])([.}{\w]*)", "\2") ; obcina kropki EndIf ;ConsoleWrite($sREResult2 & @CRLF) If $OnlyFirst Then $sREResult2 = '(?i)(.*?)' & $sREResult2 & ".*" ;ConsoleWrite($sREResult2 & @CRLF) $sREResult3 = StringRegExpReplace($sREResult1, $sREResult2, "\1") ; test pathern ("first") If Not @extended Then Return SetError(3, 3, '') ; extendet zero to nie znaleziono nic $sREResult3 = StringLen($sREResult3) / 8 Local $pozycja_Y = Int($sREResult3 / $iIW) + $y Local $pozycja_X = Int($sREResult3 - $pozycja_Y * $iIW) + ($y * $iIW) Local $aReturn[2] = [$pozycja_X, $pozycja_Y] Else $sREResult2 = '(?i)(.*?)(' & $sREResult2 & ".*?)" ; wersja dla wielu winikow ;ConsoleWrite($sREResult2 & @CRLF) $sREResult3 = StringRegExp($sREResult1, $sREResult2, 3) ; test pathern ("mulit") If @error Or Not IsArray($sREResult3) Then Return SetError(3, 3, '') Local $ile = UBound($sREResult3) Local $i Local $aReturn[$ile / 2][2] Local $sREResult4 = 0 Local $pozycja_Y Local $pozycja_X For $i = 0 To $ile - 1 Step 2 $sREResult4 += StringLen($sREResult3[$i]) / 8 If $i > 0 Then $sREResult4 += StringLen($sREResult3[$i + 1]) / 8 $pozycja_Y = Int($sREResult4 / $iIW) + $y $pozycja_X = Int($sREResult4 - $pozycja_Y * $iIW) + ($y * $iIW) $aReturn[$i / 2][0] = $pozycja_X $aReturn[$i / 2][1] = $pozycja_Y Next EndIf Return $aReturn EndFunc ;==>myImageSearch_Picture example: #include <array.au3> #include <myImageSearch.au3> ;Opt('MustDeclareVars', 1) ;########## test 1 Desktop ########## Global $pozycja1 Global $time1 Global $ImageSearch = @ScriptDir & "\recycle.bmp" Global $x = 0 Global $y = 0 Global $w = @DesktopWidth Global $h = @DesktopHeight Global $ColorTrans = '' Global $mOnlyFirst = True Sleep(10) $time1 = TimerInit() $pozycja1 = myImageSearch_Desktop($ImageSearch, $x, $y, $w, $h, $ColorTrans, $mOnlyFirst) If @error Then ConsoleWrite("sorry image not exist" & @CRLF) ConsoleWrite("time 1: " & TimerDiff($time1) / 1000 & ' sek.' & @CRLF) If IsArray($pozycja1) Then _ArrayDisplay($pozycja1) EndIf ;################################## ;########## test 2 Scren ########## Global $pozycja2 Global $time2 Global $ImageBazowe = @ScriptDir & "\where is wally.bmp" Global $ImageSearch = @ScriptDir & "\wanted wally.bmp" Global $x = 0 Global $y = 0 Global $w = 0 Global $h = 0 Global $ColorTrans = "0x00ffff" Global $mOnlyFirst = False ;False = search more image, but not all.., ; ;If u use "False" max area for search must be 800x600 pixels, ; ;or equivalent maximal 480.000 pixels!!! ; ;No more. ; ;Recommended is "True" Sleep(10) $time2 = TimerInit() $pozycja2 = myImageSearch_Picture($ImageBazowe, $ImageSearch, $x, $y, $w, $h, $ColorTrans, $mOnlyFirst) If @error Then ConsoleWrite("sorry image not exist" & @CRLF) ConsoleWrite("time 2: " & TimerDiff($time2) / 1000 & ' sek.' & @CRLF) If IsArray($pozycja2) Then _ArrayDisplay($pozycja2) EndIf ;##################################myImageSearch.au3 myImageSearch (Examples).au3 recycle.bmp where is wally.bmp wanted wally.bmp
×
×
  • Create New...