Search the Community
Showing results for tags 'ltnhanst94'.
Found 1 result
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 have a feature that will make it run slower is $MaxImg variable, this variable will allow you to return multiple positions of a finding image. Some highlights: Very fast with imagesearchdll embedded, no external files required. Tolerances and Max Images are supported. Optimized. Use with handle or full screen easily. Included global functions, so you can run multiple functions in one capture. Examples used for testing included. Notes: Image use for searching should be a "24-bit Bitmap" format. I included $IsUser32 variable in some places like _GlobalImgInit, _HandleCapture. This variable allowed you to use DllCall with "PrintWindow" parameter instead of _WinAPI_BitBlt with $SRCCOPY. $IsUser32 = True is useful for window explorer handle, $IsUser32 = False is useful for the emulator handle (NoxPlayer handle example included). If hwnd parameter equal "", it will use hold 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 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 picture in picture instead of handle. _HandleGetPixel: Get pixel in handle image. _HandlePixelCompare: Compare color with pixel color of handle image. _HandleCapture: Capture handle screen. Source code: https://github.com/ltnhanst94/HandleImgSearch 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.