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 Need | AHK APIs | EyeAuras Route | First C# Shape | Judgment | Notes |
|---|---|---|---|---|---|
| Find pixels or images | PixelGetColor, PixelSearch, ImageSearch, CoordMode | IComputerVisionExperimentalScriptingApi, ICvAccessor, IOsdSelectionService | CV.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:
CoordMode "Pixel", "Screen"
CoordMode "Mouse", "Screen"
if PixelSearch(&x, &y, 0, 0, 800, 600, 0xFF0000, 10)
Click x, y
EyeAuras script:
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.
Verification Links
- AHK docs: CoordMode, PixelGetColor, PixelSearch, ImageSearch.
- AHK source: pixel.cpp, script_autoit.cpp.
- EyeAuras docs: Computer Vision / Images, IComputerVisionExperimentalScriptingApi, OSD Selection.
- EyeAuras source: IComputerVisionExperimentalScriptingApi.cs, ICvAccessor.cs, CvAccessor.cs.