cd /news/developer-tools/i-built-a-lightweight-macro-recorder… · home topics developer-tools article
[ARTICLE · art-102668] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

I Built a Lightweight Macro Recorder in Rust (Mostly with an AI Agent)

A developer built a lightweight macro recorder in Rust, using an AI agent for most of the code while handling architecture and complex parts manually. The tool supports UI Automation, image search, OCR, and fixed coordinates, and is available as an open-source project on GitHub.

read1 min views1 publishedAug 19, 2026

I got tired of closed-source macro tools. Most of them store macros in binary formats, have poor DPI awareness, and install global keyboard hooks. For a tool that essentially injects input, closed source felt uncomfortable.

So I wrote my own.

.exe

, no installerIf

/ While

, variables, and screen conditionsFour approaches, ordered from cheapest to most expensive:

Windows UI Automation by name

No coordinates, no thresholds. Works well for normal desktop apps. Almost useless in games that draw their own UI.

Image search

You paste a screenshot snippet (Win+Shift+S). I added the ability to restrict the search area. On my 1440p monitor this dropped the average step from ~78 ms to ~7 ms.

OCR via the built-in Windows engine

No external models to download.

Fixed coordinates

DPI-aware and anchored to the target window.

The majority of the code was written with an AI agent. I directed the architecture, reviewed every part, fixed the non-trivial pieces (especially the image-search optimization and proper DPI handling), and made the design decisions. The final codebase is still normal, readable Rust.

SendInput

can be detected by some anti-cheatsNo telemetry, no accounts, no ads.

I’m mainly looking for feedback on the architecture and any better approaches for the image search / OCR parts.

The repository is public:

[https://github.com/blackixxce12/macro-recorder]

── more in #developer-tools 4 stories · sorted by recency
── more on @rust 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-a-lightweigh…] indexed:0 read:1min 2026-08-19 ·