Leaderboard
Popular Content
Showing content with the highest reputation since 11/07/2024 in Files
-
Version 1.6.3.0
18,736 downloads
Extensive library to control and manipulate Microsoft Active Directory. Threads: Development - General Help & Support - Example Scripts - Wiki Previous downloads: 30467 Known Bugs: (last changed: 2020-10-05) None Things to come: (last changed: 2020-07-21) None BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort4 points -
Version v3.3.3
11,561 downloads
ImageSearch UDF - AutoIt Wrapper for ImageSearchDLL Overview ImageSearchDLL_UDF.au3 is a high-level AutoIt wrapper for ImageSearchDLL, providing easy-to-use functions for image searching, mouse automation, and multi-monitor support. It handles all the complexity of DLL calls and provides a clean, reliable API with built-in error handling and fallback mechanisms. Author: Dao Van Trong - TRONG.PRO UDF Version: v3.3 Compatible with: ImageSearchDLL v3.3+ AutoIt Version: 3.3.16.1+ License: MIT License ☕ Support My Work Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal Your support helps me continue developing and maintaining this library for the community! 🙏 Key Features Search Functions Screen Search: Find images on screen with multi-monitor support Image-in-Image Search: Find images within other images HBITMAP Search: Direct bitmap handle searching Wait & Click: Wait for image and auto-click when found Cache Control: Enable/disable persistent caching per search Mouse Automation (v3.3 Enhanced) Multi-Monitor Support: 100% reliable on all monitor configurations Negative Coordinates: Full support via WinAPI SetCursorPos Click Simulation: WinAPI mouse_event for all button types Smooth Movement: Optional speed parameter for cursor animation Window Clicks: Click relative to window positions Monitor Management Auto-Detection: Enumerate all connected monitors Virtual Desktop: Coordinate conversion between monitor and virtual space Specific Monitor Search: 2-3x faster when searching single monitor Monitor Info: Get position, size, and primary status Installation Include the UDF in your AutoIt script: #include "ImageSearchDLL_UDF.au3" Place DLL in same directory as script: ImageSearchDLL_x64.dll for x64 AutoIt ImageSearchDLL_x86.dll for x86 AutoIt Not required, as the DLL is already embedded in the UDF! Initialize (automatic on first use): _ImageSearch_Startup() ; Optional - auto-called if needed Quick Start Examples Example 1: Simple Image Search #include "ImageSearchDLL_UDF.au3" ; Search for image on screen Local $aResult = _ImageSearch("button.png") If $aResult[0][0] > 0 Then ConsoleWrite("Found at: X=" & $aResult[1][0] & ", Y=" & $aResult[1][1] & @CRLF) ; Click the found image _ImageSearch_MouseClick("left", $aResult[1][0], $aResult[1][1]) Else ConsoleWrite("Image not found" & @CRLF) EndIf Example 2: Multi-Monitor Search #include "ImageSearchDLL_UDF.au3" ; Search on all monitors (virtual desktop) Local $aResult = _ImageSearch("icon.png", 0, 0, 0, 0, -1) ; OR search on specific monitor (faster!) Local $aResult = _ImageSearch("icon.png", 0, 0, 0, 0, 2) ; Monitor 2 If $aResult[0][0] > 0 Then ConsoleWrite("Found " & $aResult[0][0] & " match(es)" & @CRLF) For $i = 1 To $aResult[0][0] ConsoleWrite("Match " & $i & ": X=" & $aResult[$i][0] & ", Y=" & $aResult[$i][1] & @CRLF) Next EndIf Example 3: Wait and Click #include "ImageSearchDLL_UDF.au3" ; Wait up to 5 seconds for image, then click it Local $iResult = _ImageSearch_WaitClick(5000, "submit.png", "left", 1) If $iResult Then ConsoleWrite("Image found and clicked!" & @CRLF) Else ConsoleWrite("Timeout - image not found" & @CRLF) EndIf Example 4: Find All Occurrences #include "ImageSearchDLL_UDF.au3" ; Find all matches (up to 10) Local $aResult = _ImageSearch("item.png", 0, 0, 0, 0, -1, 10, 10) If $aResult[0][0] > 0 Then For $i = 1 To $aResult[0][0] ConsoleWrite("Match " & $i & ": ") ConsoleWrite("X=" & $aResult[$i][0] & ", Y=" & $aResult[$i][1]) ConsoleWrite(", W=" & $aResult[$i][2] & ", H=" & $aResult[$i][3] & @CRLF) Next EndIf Example 5: Image-in-Image Search #include "ImageSearchDLL_UDF.au3" ; Search for button.png within screenshot.png Local $aResult = _ImageSearch_InImage("screenshot.png", "button.png", 15, 5) If $aResult[0][0] > 0 Then ConsoleWrite("Found " & $aResult[0][0] & " match(es) in image" & @CRLF) EndIf Example 6: Region Search with Tolerance #include "ImageSearchDLL_UDF.au3" ; Search in specific region with high tolerance Local $aResult = _ImageSearch("target.png", 100, 100, 800, 600, -1, 20) If $aResult[0][0] > 0 Then ConsoleWrite("Found at: " & $aResult[1][0] & ", " & $aResult[1][1] & @CRLF) EndIf Example 7: Cache-Enabled Search #include "ImageSearchDLL_UDF.au3" ; Enable cache for 30-50% performance boost on repeated searches Local $aResult = _ImageSearch("icon.png", 0, 0, 0, 0, -1, 10, 1, 1, 1.0, 1.0, 0.1, 0, 1) ; ↑ ; iUseCache=1 If $aResult[0][0] > 0 Then ConsoleWrite("Found (cached search): " & $aResult[1][0] & ", " & $aResult[1][1] & @CRLF) EndIf Example 8: Monitor Management #include "ImageSearchDLL_UDF.au3" ; Get monitor information _ImageSearch_Monitor_GetList() ConsoleWrite("Total monitors: " & $g_aMonitorList[0][0] & @CRLF) For $i = 1 To $g_aMonitorList[0][0] ConsoleWrite("Monitor " & $i & ": " & _ $g_aMonitorList[$i][5] & "x" & $g_aMonitorList[$i][6] & _ ($g_aMonitorList[$i][7] ? " (Primary)" : "") & @CRLF) Next ; Convert coordinates between monitor and virtual desktop Local $aVirtual = _ImageSearch_Monitor_ToVirtual(2, 100, 200) ConsoleWrite("Monitor 2 (100,200) = Virtual (" & $aVirtual[0] & "," & $aVirtual[1] & ")" & @CRLF) Core Functions Reference Search Functions _ImageSearch() _ImageSearch($sImagePath, [$iLeft=0], [$iTop=0], [$iRight=0], [$iBottom=0], [$iScreen=-1], [$iTolerance=10], [$iResults=1], [$iCenterPOS=1], [$fMinScale=1.0], [$fMaxScale=1.0], [$fScaleStep=0.1], [$iReturnDebug=0], [$iUseCache=0]) Parameters: $sImagePath - Image file path (or multiple: "img1.png|img2.png") $iLeft, $iTop, $iRight, $iBottom - Search region (0 = full screen) $iScreen - Monitor: -1=all, 0=primary, 1=first, 2=second, etc. $iTolerance - Color tolerance 0-255 $iResults - Max results to return (1-64) $iCenterPOS - 1=return center, 0=return top-left $fMinScale, $fMaxScale, $fScaleStep - Scaling parameters $iReturnDebug - 1=enable debug output $iUseCache - 1=enable cache, 0=disable Returns: Array[0][0] = match count Array[1..n][0] = X coordinate Array[1..n][1] = Y coordinate Array[1..n][2] = Width Array[1..n][3] = Height _ImageSearch_InImage() _ImageSearch_InImage($sSourceImage, $sTargetImage, [$iTolerance=10], [$iResults=1], [$iCenterPOS=1], [$fMinScale=1.0], [$fMaxScale=1.0], [$fScaleStep=0.1], [$iReturnDebug=0], [$iUseCache=0]) Search for target image(s) within a source image file. _ImageSearch_Wait() _ImageSearch_Wait($iTimeout, $sImagePath, [$iLeft=0], [$iTop=0], [$iRight=0], [$iBottom=0], [$iScreen=-1], [$iTolerance=10], [$iResults=1], [$iCenterPOS=1], [$fMinScale=1.0], [$fMaxScale=1.0], [$fScaleStep=0.1], [$iReturnDebug=0], [$iUseCache=0]) Wait for image to appear (with timeout in milliseconds). _ImageSearch_WaitClick() _ImageSearch_WaitClick($iTimeout, $sImagePath, [$sButton="left"], [$iClicks=1], [$iLeft=0], [$iTop=0], [$iRight=0], [$iBottom=0], [$iScreen=-1], [$iTolerance=10], [$iResults=1], [$iCenterPOS=1], [$fMinScale=1.0], [$fMaxScale=1.0], [$fScaleStep=0.1], [$iReturnDebug=0], [$iUseCache=0]) Wait for image and automatically click it when found. Mouse Functions (v3.3 Enhanced) _ImageSearch_MouseMove() _ImageSearch_MouseMove($iX, $iY, [$iSpeed=0], [$iScreen=-1]) Move mouse cursor to coordinates. Supports negative coordinates for multi-monitor. Uses WinAPI SetCursorPos for 100% reliability $iSpeed - 0=instant, >0=smooth movement with steps _ImageSearch_MouseClick() _ImageSearch_MouseClick([$sButton="left"], [$iX=-1], [$iY=-1], [$iClicks=1], [$iSpeed=0], [$iScreen=-1]) Click mouse at coordinates. Supports negative coordinates for multi-monitor. Uses WinAPI mouse_event for reliable clicking $sButton - "left", "right", "middle" $iX, $iY - Virtual desktop coordinates (-1 = current position) _ImageSearch_MouseClickWin() _ImageSearch_MouseClickWin($sTitle, $sText, $iX, $iY, [$sButton="left"], [$iClicks=1], [$iSpeed=0]) Click at window-relative coordinates. Monitor Functions _ImageSearch_Monitor_GetList() _ImageSearch_Monitor_GetList() Enumerate all monitors and populate $g_aMonitorList array. Global Array Structure: $g_aMonitorList[0][0] = Total monitor count $g_aMonitorList[i][0] = Handle $g_aMonitorList[i][1] = Left $g_aMonitorList[i][2] = Top $g_aMonitorList[i][3] = Right $g_aMonitorList[i][4] = Bottom $g_aMonitorList[i][5] = Width $g_aMonitorList[i][6] = Height $g_aMonitorList[i][7] = IsPrimary (1/0) $g_aMonitorList[i][8] = Device name _ImageSearch_Monitor_ToVirtual() _ImageSearch_Monitor_ToVirtual($iMonitor, $iX, $iY) Convert monitor-relative coordinates to virtual desktop coordinates. _ImageSearch_Monitor_FromVirtual() _ImageSearch_Monitor_FromVirtual($iMonitor, $iX, $iY) Convert virtual desktop coordinates to monitor-relative coordinates. Utility Functions _ImageSearch_CaptureScreen() _ImageSearch_CaptureScreen([$iLeft=0], [$iTop=0], [$iRight=0], [$iBottom=0], [$iScreen=-1]) Capture screen region as HBITMAP handle. _ImageSearch_hBitmapLoad() _ImageSearch_hBitmapLoad($sImageFile, [$iAlpha=0], [$iRed=0], [$iGreen=0], [$iBlue=0]) Load image file as HBITMAP with optional background color. _ImageSearch_GetVersion() _ImageSearch_GetVersion() Get DLL version string. _ImageSearch_GetSysInfo() _ImageSearch_GetSysInfo() Get system info (CPU, screen, cache stats). _ImageSearch_ClearCache() _ImageSearch_ClearCache() Clear all DLL caches (location and bitmap). Performance Tips Cache System Enable caching for repeated searches: $iUseCache=1 30-50% faster on subsequent searches Persistent across script runs Auto-validated (removes stale entries) Multi-Monitor Optimization Use specific monitor ($iScreen=1 or 2) for 2-3x faster search Use virtual desktop ($iScreen=-1) only when needed Coordinates are always in virtual desktop space (may be negative) Search Optimization Smaller region = faster search Higher tolerance = faster but less accurate Fewer results ($iResults=1) = faster Disable debug in production ($iReturnDebug=0) Version 3.3 Improvements Fixed Issues ✅ Multi-Monitor Mouse Movement - Now 100% reliable using WinAPI ✅ Negative Coordinates - Full support for monitors positioned left/above primary ✅ Mouse Click Reliability - WinAPI mouse_event never fails ✅ Coordinate Conversion - Proper handling of virtual desktop space Enhanced Features Debug logging shows actual mouse position after move Better error handling with meaningful error codes All mouse functions bypass DLL for maximum reliability Smooth cursor movement with customizable speed Breaking Changes Mouse functions no longer rely on DLL implementation Always use WinAPI for mouse operations (more reliable) Troubleshooting "DLL not found" Error Ensure DLL is in same directory as script Use correct architecture (x64 vs x86) Check with FileExists($g_sImgSearchDLL_Path) Mouse Not Moving on Second Monitor ✅ Fixed in v3.3! Now uses WinAPI SetCursorPos Coordinates are virtual desktop (may be negative) Update to UDF v3.3 or later Image Not Found Check image file exists Increase tolerance ($iTolerance=20) Enable debug ($iReturnDebug=1) to see search info Try different region/monitor settings Slow Search Performance Enable cache ($iUseCache=1) Use specific monitor instead of all monitors Reduce search region Lower max results Example: Complete Script #include "ImageSearchDLL_UDF.au3" ; Initialize _ImageSearch_Startup() ; Show system info ConsoleWrite("UDF: " & $IMGS_UDF_VERSION & @CRLF) ConsoleWrite("DLL: " & _ImageSearch_GetVersion() & @CRLF) ConsoleWrite(_ImageSearch_GetSysInfo() & @CRLF) ; Search for image with cache enabled Local $aResult = _ImageSearch("target.png", 0, 0, 0, 0, -1, 10, 5, 1, 1.0, 1.0, 0.1, 1, 1) If $aResult[0][0] > 0 Then ConsoleWrite("Found " & $aResult[0][0] & " match(es):" & @CRLF) For $i = 1 To $aResult[0][0] ConsoleWrite(" Match " & $i & ": ") ConsoleWrite("X=" & $aResult[$i][0] & ", Y=" & $aResult[$i][1]) ConsoleWrite(", W=" & $aResult[$i][2] & ", H=" & $aResult[$i][3] & @CRLF) ; Move mouse and click _ImageSearch_MouseMove($aResult[$i][0], $aResult[$i][1], 10) Sleep(500) _ImageSearch_MouseClick("left", $aResult[$i][0], $aResult[$i][1]) Sleep(1000) Next Else ConsoleWrite("No matches found" & @CRLF) EndIf ; Cleanup _ImageSearch_Shutdown() License & Contact Author: Dao Van Trong Website: TRONG.PRO Email: trong@email.com License: MIT License AutoIt Forum: Post in AutoIt General Help See Also README.md - DLL API reference and C++ examples ImageSearchDLL_TestSuite.au3 - Interactive GUI test application Thank you for using ImageSearch UDF! 🚀3 points -
Version v3.3
228 downloads
ImageSearchDLL - Ultra-Fast Image Search Overview ImageSearchDLL is a high-performance dynamic link library (DLL) designed for ultra-fast image searching on the screen, within other images, or using bitmap handles. It leverages SIMD instructions (SSE2, AVX2, AVX512) for optimized performance and includes features like caching, scaling, tolerance matching, and integrated mouse click functionality. The DLL is compatible with Windows environments and supports both 32-bit (x86) and 64-bit (x64) architectures. Author: Dao Van Trong - TRONG.PRO DLL Version: v3.3 License: MIT Two variants are provided: ImageSearchDLL_XP.cpp: C++03 compatible, supports Windows XP+ (legacy systems). ImageSearchDLL.cpp: Using modern c++, only supported from Win 7 SP1 (AVX2/AVX512 support on x64). ☕ Support My Work Enjoy my work? Buy me a 🍻 or tip via ❤️ PayPal Your support helps me continue developing and maintaining this library for the community! 🙏 Features Ultra-Fast Search: Uses SIMD-accelerated algorithms for rapid pixel matching. Search Modes: Screen search (capture and search on desktop or specific monitors). Image-in-image search. HBITMAP-based search. Scaling Support: Search with variable scales (min/max scale, step size). Tolerance Matching: Adjustable color tolerance for fuzzy matches. Transparency Handling: Optional alpha channel support. Caching System: In-memory LRU cache for locations and bitmaps Persistent disk cache (survives DLL reload) Optional cache control via iUseCache parameter Automatic cache validation and cleanup Multi-Monitor Support: Handles virtual screens and specific monitors. Mouse Click Integration: Click at found positions or windows with customizable speed and buttons. Debug Output: Optional detailed debug information in results. System Info: Retrieve CPU features, screen details, and cache status. Pool Management: Efficient memory pooling for pixel buffers. Requirements Operating System: XP Version: Windows XP or later. Modern Version: Windows 7 or later (recommended for AVX support). Compiler: Microsoft Visual C++ (MSVC) or compatible. Dependencies: GDI+ (included in Windows), no external libraries needed. CPU: SSE2 required for basic functionality; AVX2/AVX512 for enhanced performance on x64. For AutoIt Users ⚠️ AutoIt users should use the UDF wrapper instead of calling DLL directly. The ImageSearchDLL_UDF.au3 wrapper provides: ✅ Easy-to-use functions with AutoIt-friendly syntax ✅ Automatic error handling and validation ✅ Multi-monitor support with WinAPI fallback (v3.3) ✅ Built-in monitor enumeration and coordinate conversion ✅ Reliable mouse operations on all configurations 👉 See README_UDF.md for AutoIt documentation and examples. Installation (C++/Other Languages) Build the DLL: Open the .cpp file in Visual Studio. Set platform to x86 or x64. Build as a DLL project. Output: ImageSearchDLL_x64.dll or ImageSearchDLL_x86.dll Usage in Code: Load the DLL dynamically using LoadLibraryW. Get function pointers with GetProcAddress. See C++ examples below. API Reference The DLL exports several functions. All string parameters are wide strings (wchar_t*). Results are returned as const wchar_t* strings in formats like {error_code}[results]<error_message> or 1|x|y|w|h|scale|source for successful matches. Core Search Functions const wchar_t* WINAPI ImageSearch(const wchar_t* sImageFile, int iLeft=0, int iTop=0, int iRight=0, int iBottom=0, int iScreen=0, int iTolerance=10, int iResults=1, int iCenterPOS=1, float fMinScale=1.0f, float fMaxScale=1.0f, float fScaleStep=0.1f, int iReturnDebug=0, int iUseCache=0) Searches for image(s) on the screen. sImageFile: Path to target image(s), supports wildcards (e.g., *img*.png). Region: iLeft, iTop, iRight, iBottom (0 for full screen). iScreen: Monitor index (1-based; 0 for primary, negative for virtual). iUseCache: 0=disabled (default), 1=enabled (use persistent cache). Returns: Number of matches followed by details, or error. const wchar_t* WINAPI ImageSearch_InImage(const wchar_t* sSourceImageFile, const wchar_t* sTargetImageFile, int iTolerance=10, int iResults=1, int iCenterPOS=1, float fMinScale=1.0f, float fMaxScale=1.0f, float fScaleStep=0.1f, int iReturnDebug=0, int iUseCache=0) Searches for target image within a source image file. iUseCache: 0=disabled (default), 1=enabled (use persistent cache). const wchar_t* WINAPI ImageSearch_hBitmap(HBITMAP hBitmapSource, HBITMAP hBitmapTarget, int iTolerance, int iLeft, int iTop, int iRight, int iBottom, int iResults=1, int iCenter=1, float fMinScale=1.0f, float fMaxScale=1.0f, float fScaleStep=0.1f, int iReturnDebug=0, int iUseCache=0) Searches using bitmap handles. iUseCache: 0=disabled (default), 1=enabled (use persistent cache). Utility Functions HBITMAP WINAPI ImageSearch_CaptureScreen(int iLeft=0, int iTop=0, int iRight=0, int iBottom=0, int iScreen=0) Captures a screen region as HBITMAP. HBITMAP WINAPI ImageSearch_hBitmapLoad(const wchar_t* sImageFile, int iAlpha=0, int iRed=0, int iGreen=0, int iBlue=0) Loads image as HBITMAP with optional background color. void WINAPI ImageSearch_ClearCache() Clears location and bitmap caches. const wchar_t* WINAPI ImageSearch_GetVersion() Returns DLL version string. const wchar_t* WINAPI ImageSearch_GetSysInfo() Returns system info (CPU features, screen size, cache stats). Mouse Click Functions int WINAPI ImageSearch_MouseMove(int iX, int iY, int iSpeed, int iScreen) Moves mouse cursor to screen coordinates. Returns: 1 on success, 0 on failure. Note: UDF v3.3 uses WinAPI fallback for reliable multi-monitor support. int WINAPI ImageSearch_MouseClick(const wchar_t* sButton, int iX, int iY, int iClicks, int iSpeed, int iScreen) Clicks at screen coordinates. sButton: "left", "right", "middle" (case-insensitive). iX, iY: Virtual desktop coordinates (supports negative values for multi-monitor). iScreen: Monitor index (-1=all, 1=first, 2=second, etc.). Returns: 1 on success, 0 on failure. Note: UDF v3.3 uses WinAPI fallback for reliable multi-monitor support. int WINAPI ImageSearch_MouseClickWin(const wchar_t* sTitle, const wchar_t* sText, int iX, int iY, const wchar_t* sButton, int iClicks, int iSpeed) Clicks relative to a window (found by title/text). Returns: 1 on success, 0 on failure. Usage Examples C++ Example: Basic Screen Search #include <windows.h> #include <iostream> typedef const wchar_t* (WINAPI* PFN_ImageSearch)( const wchar_t*, int, int, int, int, int, int, int, int, float, float, float, int, int); int main() { // Load DLL HMODULE hDll = LoadLibraryW(L"ImageSearchDLL_x64.dll"); if (!hDll) { std::wcerr << L"Failed to load DLL" << std::endl; return 1; } // Get function pointer auto pImageSearch = (PFN_ImageSearch)GetProcAddress(hDll, "ImageSearch"); if (!pImageSearch) { std::wcerr << L"Failed to get ImageSearch function" << std::endl; FreeLibrary(hDll); return 1; } // Call ImageSearch const wchar_t* result = pImageSearch( L"target.png", // Image path 0, 0, // Left, Top (0 = full screen) 1920, 1080, // Right, Bottom -1, // Screen (-1 = all monitors) 10, // Tolerance 1, // Max results 1, // Center position 1.0f, 1.0f, // Min/Max scale 0.1f, // Scale step 1, // Debug output 0 // Cache disabled ); std::wcout << L"Result: " << result << std::endl; // Parse result: {count}[x|y|w|h,...](debug info) // Example: {1}[640|480|32|32](time=50ms...) FreeLibrary(hDll); return 0; } C++ Example: Image-in-Image Search #include <windows.h> #include <iostream> typedef const wchar_t* (WINAPI* PFN_ImageSearch_InImage)( const wchar_t*, const wchar_t*, int, int, int, float, float, float, int, int); int main() { HMODULE hDll = LoadLibraryW(L"ImageSearchDLL_x64.dll"); if (!hDll) return 1; auto pFunc = (PFN_ImageSearch_InImage)GetProcAddress(hDll, "ImageSearch_InImage"); if (!pFunc) { FreeLibrary(hDll); return 1; } const wchar_t* result = pFunc( L"screenshot.png", // Source image L"button.png", // Target image to find 15, // Tolerance 5, // Max results 1, // Center position 1.0f, 1.0f, 0.1f, // Scale parameters 1, // Debug 0 // Cache ); std::wcout << L"Result: " << result << std::endl; FreeLibrary(hDll); return 0; } C++ Example: HBITMAP Search #include <windows.h> #include <iostream> #include <gdiplus.h> typedef const wchar_t* (WINAPI* PFN_ImageSearch_hBitmap)( HBITMAP, HBITMAP, int, int, int, int, int, int, int, float, float, float, int, int); int main() { HMODULE hDll = LoadLibraryW(L"ImageSearchDLL_x64.dll"); if (!hDll) return 1; auto pFunc = (PFN_ImageSearch_hBitmap)GetProcAddress(hDll, "ImageSearch_hBitmap"); if (!pFunc) { FreeLibrary(hDll); return 1; } // Load bitmaps (pseudo-code, use GDI+ or other methods) HBITMAP hSource = LoadBitmapFromFile(L"screenshot.bmp"); HBITMAP hTarget = LoadBitmapFromFile(L"icon.bmp"); const wchar_t* result = pFunc( hSource, hTarget, // Source and target bitmaps 10, // Tolerance 0, 0, 0, 0, // Search region (0 = entire source) 1, // Max results 1, // Center position 1.0f, 1.0f, 0.1f, // Scale 1, // Debug 0 // Cache ); std::wcout << L"Result: " << result << std::endl; DeleteObject(hSource); DeleteObject(hTarget); FreeLibrary(hDll); return 0; } Result Format Results start with {code} for errors (e.g., {-1}[]<Invalid path or image format>). Positive numbers indicate match count. Performance Tips Search Performance Enable Caching: Set iUseCache=1 for repeated searches (30-50% faster) Cache Benefits: In-memory cache: Instant lookup for recent searches Disk cache: Persists across DLL reloads Auto-validation: Removes stale entries after 3 misses Adjust Tolerance: Higher tolerance = faster but less accurate Scale Steps: Larger steps = faster but may miss matches SIMD Support: On x64, ensure AVX2/AVX512 for best performance Memory Pool: Automatic optimization, no manual tuning needed Multi-Monitor Setup Specific Monitor Search: Use iScreen=1 or iScreen=2 for 2-3x faster search Virtual Desktop: Use iScreen=-1 to search across all monitors Coordinate System: DLL returns virtual desktop coordinates (may be negative) Mouse Operations: Use UDF v3.3 for reliable mouse movement/clicking on all monitors Limitations DLL Limitations Max results: 1024 Image size limit: 32000x32000 pixels Max pixel count: 100M pixels per image Cache limits: 100 locations, 100 bitmaps (LRU eviction) Thread-safe but single DLL instance recommended per process Known Issues (DLL v3.3) Mouse Functions: DLL mouse functions may not work reliably on multi-monitor setups Solution: Use UDF v3.3 which provides WinAPI-based fallback Impact: Mouse operations now 100% reliable on all monitor configurations Negative Coordinates: DLL returns negative coords for monitors positioned left/above primary Solution: UDF v3.3 handles this correctly with SetCursorPos Related Documentation README_UDF.md - AutoIt wrapper documentation with examples ImageSearchDLL_UDF.au3 - AutoIt wrapper source code ImageSearchDLL_TestSuite.au3 - Interactive GUI test application Contributing & Support For issues, contributions, or commercial licensing: Website: TRONG.PRO Email: trong@email.com For AutoIt users: See README_UDF.md for easy-to-use wrapper functions and AutoIt examples. Thank you for using ImageSearchDLL! 🚀3 points -
3 points
-
Win 11 - My own border color
Danyfirex and one other reacted to argumentum for a file
Version 0.2411.14.3
303 downloads
I use dark mode and would love to have the border with colors of my choosing. While I wait for Windows to implement a user selectable option in their settings, I cooked my own "border color setter". Since am at it, chose to have a color for elevated/admin windows and another for user level GUIs. Or not, is user selectable. Win11myOwnBorderColor.exe (v0.2411.14.3) SHA-1: 9A828D820E4DDF5DD20EE683998FB5D050697C15 SHA-256: 9FBA1FE2041104438C2B62A4EE32C231185209EABBA62B9A125378F833ED623C I wrote a FAQ / Help to give an idea of how to use it. That is very intuitive once you use it. But is there to read if you have questions. If the answers don't cover your question, join the forum and make a post for your question on the thread.2 points -
Version 1.6.1.0
3,067 downloads
Extensive library to control and manipulate Microsoft Task Scheduler Service. Please check this site for the implementation status! Please check the History.txt file in the archive for the changelog. Please check the WIKI for details about how to use the UDF. BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2021-02-03) None Things to come (last changed: 2021-02-03) None2 points -
Version 1.7.0.2
10,976 downloads
Extensive library to control and manipulate Microsoft Outlook. This UDF holds the functions to automate items (folders, mails, contacts ...) in the background. Can be seen like an API. There are other UDFs available to automate Outlook: OutlookEX_GUI: This UDF holds the functions to automate the Outlook GUI. OutlookTools: Allows to import/export contacts and events to VCF/ICS files and much more. Threads: Development - General Help & Support - Example Scripts - Wiki BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort KNOWN BUGS (last changed: 2020-02-09) None2 points -
Version 3.4
1,656 downloads
The CodeScannerCrypterBundle (ca. 2.9 MB unzipped) contains the following UDFs and utilities: CodeScanner: analyse AutoIt script structure and content, identify potential issues, generate MCF data files CodeCrypter: front-end GUI for the MCF library, for script encryption (without storing the decryption key(s) in the script!) MetaCodeFile UDF (MCF library): for analysis and user-defined alterations of AutoIt script structure and content MCFinclude.au3: #include this UDF in any AutoIt script that you wish CodeCrypter to process CryptoNG, by TheXman; encryption UDF using Bcrypt dll calls (32/64-bit; various algorithms) StoreCCprofile.au3/readCSdatadump.au3/helloworld.au3: auxiliary utilities and example script HowToCodeCrypt.pdf: a simple guide in five steps CodeCrypterFAQ.pdf: questions and answers, partly based upon exchanges in the CodeCrypter thread. MetaCodeTutorial.pdf: the MCF engine explained; useful for encryption, GUI translation, code translation, and much more... Please follow the links for additional information.2 points -
1 point
-
201 downloads
3.3.17.1 (July 08, 2025) (Beta) AutoIt: UDFs: - Fixed: Typo in variable name in Date.au3 introduced in previous beta. 3.3.17.0 (June 29, 2025) (Beta) AutoIt: - Changed: Windows 7/Server 2008 is now the minimum OS version required due to dev environment changes. - Added #3891: DllCall() performance optimisation. - Added: Standard Windows Fonts List for Win10/Win11. - Added #3906: GUICtrlCreateXXX creation in example assign to $idXXX to reflect Ctrl type. - Added: FileGetAttrib() retrieve Join folder (J) as created by FileCreateNTFSLink(). - Added: Split WindowsConstants.u3 in WindowsNotifsConstants.au3, WindowsStylesConstants.au3 and WindowsSysColor.au3. - Added: #3984: GUICtrlSetGraphic() doc precision. - Fixed: Doc Chr(0) handling inside functions. - Fixed #3923: Doc typo in "Send Key List". - Fixed: Regression #3135 handle leak (Thanks Nano, Rudi, Nine). - Fixed #3925: Doc With ... EndWith using DllStruct Type. - Fixed: Links in Tutorials example code (thanks argumentum). Au3info: - Added: Display mouse coordinate mode. - Fixed #3917: Crash under Win7. SciTE-Lite: - Fixed: Folding Fix for #Preprocessor foldblock when followed by a CommentBlock. UDFs: - Added: script examples when running under Win11 with new notepad.exe. - Added: _GUICtrlTreeView_GetItemByIndex() can retrieve handle of the list of main item ($hItem= -1). - Added: _IsPressed() can be called with numeric value as in "WinAPIsvkeysConstants.au3". - Added #3909: _DebugReportData() to report Array column formatted. - Added: libExamples referring MemoWrite() now refer to _MemoWrite() defined in Extras\HelpFileInternals.au3. - Added: _WinAPI_WaitSystemIdle(), _WinAPI_QueryDiskUsage(), _WinAPI_QueryProcessorUsage(), _WinAPI_QueryProcessCycleTime() - Added: Doc _WinAPI_GetWindowSubclass() example (Thanks pixelSearch). - Added: _WinAPI_GetKeyboardLayout() default value for the running thread. - Added: _WinAPI_GetUserDefaultLCID() example. - Added: _WinAPI_GetKeyboardLayoutLocale(). - Added: _WinAPI_GetKeyboardState() example (Thanks AutoXenon). - Added #3932: Try to use file in HelpFile\Extras instead of @ScriptDir. - Added #3934: _WinAPI_SetTimer() example. - Added: _IsPressed() can wait on one of several keys. - Added: _WinAPI_SendInput(). - Added #3960: _Div() integer division. - Added #3963: _WinAPI_OpenEvent(). - Added: _GDIPlus_ImageSaveToFile() doc precision for compression level. - Added: _WinAPI_GetCursorSize() and _WinAPI_SetCursorSize(). - Added: $FOLDERID_Documents Constants in APIShellExConstants.au3. - Added: Support _GUIToolTip*() to be used to external process. - Added: Support _GUICtrlHeader*() to be used to external process. - Added: Support _GUICtrlStatusBar*() to be used to external process. - Added #3988: _WinAPI_GetSystemPowerStatus() return Battery status saver. - Added #3985: _ArrayDisplay() + $WS_EX_TOPMOST. - Added #3991: _SQLite_ForeignKeys() and Add a parameter in _SQLite_Open() to set it also. - Added #3990: _IsPressed() return in @extended if the key is still pressed. - Added: _DebugSetup(..., 1) does not interact with script being debug, Report infos copied to clipboard - Added: _WinAPI_SetWindowTheme() example to demonstrate Checkbox or Radio controls coloring. - Added #3997: _WinAPI_RegisterShellHookWindow() example improvement. - Added #3999: _WinAPI_OemToChar() performance improvement. - Added #3946: _ChooseFont() updated defaults (thanks argumentum). - Added: _DateDiff(), _DateAdd() using array for [days, hours, minutes, seconds]. - Added: _DebugSetup() Type 6, same as 1 but a timeout to close the report log windows. - Fixed #3894: _WinAPI_GetProcessName() returns incorrect result when process ID is invalid. - Fixed: "Then SetError()" in several standard UDF. - Fixed #3921: Missing _GUICtrlStatusBar_SetParts() examples. - Fixed: Doc typo $GPIP_ERR* >> $GDIP_ERR*. - Fixed #3926: _GUICtrlTreeView_SetChildren() not set/reset chidren flag. - Fixed: _WinAPI_DisplayStruct() elements containing chr(124). - Fixed #3945: StringRegExp() /s include VT. - Fixed #3949: _ArrayDisplay() does show multiple subscript of an array. - Fixed #3954: links in libfunction constants. - Fixed: missing doc description $iSubItem = - 1 in _GUICtrlListView_SetItemText(). - Fixed #3959: _WinAPI_ShellUserAuthenticationDlg() example. - Fixed #3975: unrelated link in Pcre doc. - Fixed #3903: _GuiCtrlTab_GetItem() does work on external process. - Fixed #3992: _WinAPI_DwmSetWindowAttribute() does not support all MSDN attributes. - Fixed #4001: _GUICtrlListView_*() example ($tagNMITEMACTIVATE). - Fixed #4003: _ArrayPush() doc precision. - Fixed: _GUICtrlButton_SetSplitInfo() example crash. - Fixed: Support of Notepad under Win11 for _DebugSetup(). - Fixed #4022: Various doc duplicated words. - Fixed #4031: _DebugArrayDisplay() buttons display. - Fixed: _DebugArrayDisplay() not executed if @error on entering ($ARRAYDISPLAY_CHECKERROR if no display wanted on @error). - Fixed #4033: _DateTimeSplit() setting $aTimePart[0] whem no time defined. - Fixed #4024: _DebugSetup(,, 5) (notepad window) not working under Windows 11. - Fixed: _WinAPI_IsElevated() @extended return value (Thanks Argumentum). - Fixed #4039: _GUICtrlTreeView_Delete() with $hWnd. - Fixed #4038: _GUICtrlRichEdit_StreamToFile() extra new paragraph. - Fixed #4029: _Date_Time_SystemTimeToDateTimeStr() Wrong output. - Fixed #4040: _GUICtrlRichEdit_SetZoom() parameter limitation bug. - Fixed #4041: _GUICtrlStatusBar_SetIcon() not shown.1 point -
1 point
-
Version v2.4.0
1,718 downloads
Encryption / Decryption / Hashing / Signing Purpose Cryptography API: Next Generation (CNG) is Microsoft's long-term replacement for their CryptoAPI. Microsoft's CNG is designed to be extensible at many levels and cryptography agnostic in behavior. Although the Crypt.au3 UDF lib that is installed with AutoIt3 still works well, the advapi32.dll functions that it uses have been deprecated. In addition the Crypt.au3 UDF lib, as it is currently written, has a very limited ability to decrypt AES data that was not encrypted using Crypt.au3 functions. That is because Crypt.au3 functions do not allow you to specify an actual key or initialization vector (IV). It only lets you specify data to be used to derive a key and uses a static IV. This UDF was created to offer a replacement for the deprecated functions used by Crypt.au3. According to Microsoft, deprecated functions may be removed in future release. It was also created to allow more flexibility and functionality in encryption/decryption/hashing/signing and to expand the ability for users to implement cryptography in their scripts. Description This UDF implements some of Microsoft's Cryptography API: Next Generation (CNG) Win32 API functions. It implements functions to encrypt/decrypt text and files, generate hashes, derive keys using Password-Based Key Derivation Function 2 (PBKDF2), create and verify signatures, and has several cryptography-related helper functions. The UDF can implement any encryption/decryption algorithms and hashing algorithms that are supported by the installed cryptography providers on the PC in which it is running. Most, if not all, of the "magic number" values that you would commonly use to specify that desired algorithms, key bit lengths, and other magic number type values, are already defined as constants or enums in the UDF file. To flatten the learning curve, there is an example file that shows examples of all of the major functionality. This example file is not created to be an exhaustive set of how to implement each feature and parameter. It is designed to give you a template or guide to help you hit the ground running in terms of using the functions. I have tried to fully document the headers of all of the functions as well as the code within the functions themselves. As of v1.4.0, there is also a Help file that includes all of the functions, with examples. Current UDF Functions Algorithm-Specific Symmetric Encryption/Decryption Functions _CryptoNG_AES_CBC_EncryptData _CryptoNG_AES_CBC_DecryptData _CryptoNG_AES_CBC_EncryptFile _CryptoNG_AES_CBC_DecryptFile _CryptoNG_AES_ECB_EncryptData _CryptoNG_AES_ECB_DecryptData _CryptoNG_AES_GCM_EncryptData _CryptoNG_AES_GCM_DecryptData _CryptoNG_3DES_CBC_EncryptData _CryptoNG_3DES_CBC_DecryptData _CryptoNG_3DES_CBC_EncryptFile _CryptoNG_3DES_CBC_DecryptFile Generic Symmetric Encryption/Decryption Functions _CryptoNG_EncryptData _CryptoNG_DecryptData _CryptoNG_EncryptFile _CryptoNG_DecryptFile Hashing Functions _CryptoNG_HashData _CryptoNG_HashFile _CryptoNG_PBKDF2 Asymmetric (Public/Private Key) Cryptography Functions _CryptoNG_ECDSA_CreateKeyPair _CryptoNG_ECDSA_SignHash _CryptoNG_ECDSA_VerifySignature _CryptoNG_RSA_CreateKeyPair _CryptoNG_RSA_CreateKeyPairEx _CryptoNG_RSA_EncryptData _CryptoNG_RSA_DecryptData _CryptoNG_RSA_SignHash _CryptoNG_RSA_VerifySignature Misc / Helper Functions _CryptoNG_CryptBinaryToString _CryptoNG_CryptStringToBinary _CryptoNG_GenerateRandom _CryptoNG_EnumAlgorithms _CryptoNG_EnumRegisteredProviders _CryptoNG_EnumKeyStorageProviders _CryptoNG_LastErrorMessage _CryptoNG_Version Related Links Cryptography API: Next Generation - Main Page Cryptography API: Next Generation - Reference Cryptography API: Next Generation - Primitives Cryptography API: Next Generation - Cryptographic Algorithm Providers1 point -
Version 6.1.6.6
6,130 downloads
zPlayer is a standalone, intuitive, and fully functional media player. Built to suit my purpose, it is customizable to your taste. zPlayer is powered by winmm.dll, an integral part of Windows. Features No 3rd Party Dependencies: Utilizes only Windows components and standard AutoIt UDFs. Universal Playback: Supports all digital media formats, provided proper codecs are installed. Independent Video Window: Separate video window with a minimal GUI for music. Versatile Loading Options: Load files, folders, or an audio CD for playback. Marquee Style Display: Long file names are displayed in smooth, infinite marquee style. Smart Playlists: Automatically generated playlists and easy-to-make custom playlists. Hidden Playlist: Playlist is hidden by default but available on demand in shuffled or sorted formats. Context Menus: Options include Play This File, File Properties, Search Internet, Go to This Folder, Move Playlist Item, and Remove from Playlist. Interactive Interface: Double-click any item to play it, search strings in the playlist, and use hotkeys for most functions. Playback Controls: Forward, backward, pause, and change folder. Repeat Functions: A-B repeat, current file repeat, and multiple-file repeat. Volume Control: Increase, decrease, or mute sound volume, synchronized with Windows volume mixer. Unmutes audio device on startup. Playback Environment Save: Save playback environment on session termination and resume in the next session. Resume Playback: Option to resume playback from where it was left off, with audio fade-in. Efficient Performance: Very low CPU and memory usage. Technical Information The script runs or compiles in x64 mode. To change this setting, comment out #AutoIt3Wrapper_UseX64=Y. The attached zPlayer.exe was compiled in x64 mode and is not flagged by Windows Defender as malicious. Compiling to x86 may result in false positive flags by Windows Defender. Feedback If you find an error, please download the latest version, as it may already be corrected. Otherwise, I would appreciate it if you could kindly let me know. zPlayer-NoUI.au3 The download section includes zPlayer-NoUI.au3. This is an abbreviated version of zPlayer, which is a music player controlled by hotkeys only, without a GUI. Note: zPlayer was tested to work in Windows 10 and 11. It should work in Windows 7, too. I would like to know if there is any compatibility problem.1 point -
Version 1.0.1.2
834 downloads
Small example script to Protect Tabs in chrome + close other tabs and duplicates Local $sFilePath = @ScriptDir & "\ChromeProtectedTabs.exe" ;Close other tabs not containg these key words or duplicates Local $sProtectedTabs = "msdn, developer, autoit, Gmail, amazon, DuckDuckGo, YouTube" Run($sFilePath & " " & $sProtectedTabs)1 point -
Dbug - another debugger for AutoIt
ioa747 reacted to valdemar1977 for a file
Version 2018.05.24
3,284 downloads
Dbug is graphical debugger for AutoIt. Project started by @Heron in 2009 and now supported by @asdf8 and @valdemar1977. Features Debug the complete script or just parts of it Display run status (line number of currently executed function) GUI default always-on-top in the upper right corner for comfortable debugging WM_NOTIFY and WM_COMMAND hook to prevent interference with possible message handlers Display scope, type and value of variables, expressions, macro's and constants (global AND function local) Execute commands in an immediate window. Can be expressions, functions and assignments Detailed display of array, struct and object variables Dynamic display of variable value in the source code (under cursor) Array table viewer with ability to view the sub-arrays, the correct handling of macro @Error, @Extended and other changes OEM and ANSI console output Conditional breakpoints Saving settings and debugging state and much more... How to use Extract from downloaded archive _Dbug.au3 to your Autoit include dir Add #include <_Dbug.au3> in to your code and run code Before compile or buid comment or remove #include <_Dbug.au3> from your code1 point -
Version 2.0.0
1,243 downloads
On one/multiple big sheet(s) you get users (columns) and groups (rows). The list is sorted descending by number of members so you get the users with most groups and the groups with most members on top of the page. You can filter by (multiple) samaccountname(s), department or you can create your own LDAP query filter. You can filter the resulting list of groups using a Regular Expression. Version 2.0 uses maps so at the moment it requires the latest beta version of AutoIt! BTW: If you like this tool please click the "I like this" button. This tells me where to next put my development effort1 point