<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SlopLover</title>
    <description>The latest articles on DEV Community by SlopLover (@blackixxce12).</description>
    <link>https://dev.to/blackixxce12</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4084667%2F7f1ef762-aec3-4f17-b89f-9728b2c95adc.png</url>
      <title>DEV Community: SlopLover</title>
      <link>https://dev.to/blackixxce12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blackixxce12"/>
    <language>en</language>
    <item>
      <title>I Built a Lightweight Macro Recorder in Rust (Mostly with an AI Agent)</title>
      <dc:creator>SlopLover</dc:creator>
      <pubDate>Wed, 19 Aug 2026 09:01:37 +0000</pubDate>
      <link>https://dev.to/blackixxce12/i-built-a-lightweight-macro-recorder-in-rust-mostly-with-an-ai-agent-27f4</link>
      <guid>https://dev.to/blackixxce12/i-built-a-lightweight-macro-recorder-in-rust-mostly-with-an-ai-agent-27f4</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;So I wrote my own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Single ~7 MB &lt;code&gt;.exe&lt;/code&gt;, no installer&lt;/li&gt;
&lt;li&gt;MIT license&lt;/li&gt;
&lt;li&gt;Macros are plain JSON (easy to edit and diff)&lt;/li&gt;
&lt;li&gt;Small scripting layer on top: &lt;code&gt;If&lt;/code&gt; / &lt;code&gt;While&lt;/code&gt;, variables, and screen conditions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it finds UI elements
&lt;/h2&gt;

&lt;p&gt;Four approaches, ordered from cheapest to most expensive:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Windows UI Automation&lt;/strong&gt; by name&lt;br&gt;&lt;br&gt;
No coordinates, no thresholds. Works well for normal desktop apps. Almost useless in games that draw their own UI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Image search&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
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.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OCR&lt;/strong&gt; via the built-in Windows engine&lt;br&gt;&lt;br&gt;
No external models to download.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fixed coordinates&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
DPI-aware and anchored to the target window.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  AI involvement
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations (being honest)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Windows only&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SendInput&lt;/code&gt; can be detected by some anti-cheats&lt;/li&gt;
&lt;li&gt;Global hooks + synthetic input look like a keylogger to many antivirus products. The repository contains VirusTotal results instead of pretending otherwise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No telemetry, no accounts, no ads.&lt;/p&gt;

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

&lt;p&gt;The repository is public:&lt;br&gt;&lt;br&gt;
[&lt;a href="https://github.com/blackixxce12/macro-recorder" rel="noopener noreferrer"&gt;https://github.com/blackixxce12/macro-recorder&lt;/a&gt;]&lt;/p&gt;

</description>
      <category>rust</category>
      <category>opensource</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
