AutoHotkey Migration: CV, Pixels, And Images

Mapping AutoHotkey CoordMode, PixelGetColor, PixelSearch, and ImageSearch to EyeAuras CV APIs.

AutoHotkey Migration: CV, Pixels, And Images

Use this page for CoordMode, PixelGetColor, PixelSearch, and ImageSearch.

Quick Map

AutoHotkey NeedAHK APIsEyeAuras RouteFirst C# ShapeJudgmentNotes
Find pixels or imagesPixelGetColor, PixelSearch, ImageSearch, CoordModeIComputerVisionExperimentalScriptingApi, ICvAccessor, IOsdSelectionServiceCV.ForScreen().PixelSearch(Color.Red, new Percentage(90), region)More explicit than AHK, but heavier.ForScreen() and ForWindow(window) replace implicit AHK coordinate modes. The CV API is marked experimental.

Pixel Search Then Click

AutoHotkey v2:

ahk
CoordMode "Pixel", "Screen"
CoordMode "Mouse", "Screen"
if PixelSearch(&x, &y, 0, 0, 800, 600, 0xFF0000, 10)
    Click x, y

EyeAuras script:

csharp
IComputerVisionExperimentalScriptingApi CV { get; init; }
ISendInputScriptingApi SendInput { get; init; }

var point = CV.ForScreen().PixelSearch(
    Color.FromArgb(0xFF0000),
    new Percentage(90),
    new Rectangle(0, 0, 800, 600));

if (!point.IsEmpty)
{
    SendInput.MouseLeftClick(point.X, point.Y);
}

For window-relative work, select or resolve an IWindowHandle first and use CV.ForWindow(window) so the coordinate model is explicit.

Recommendation: Good enough, but heavier than AHK. EyeAuras is clearer about screen vs window coordinates; migration still needs a dedicated CoordMode mapping table.