dwgx@blog:~$dwgx
> cd ../posts

MouseDash: Record Once, Replay Mouse Macros with One Click

// created

MouseDash is a Windows macro tool I wrote: record your mouse and keyboard actions once, then replay them with a single click. I shipped v1.0.0 in April 2025. There’s no shortage of ready-made options out there, but they’re either closed-source (which leaves me uneasy) or they play back in uniform straight lines with millisecond-locked intervals that look fake at a glance. What I wanted was playback that feels like a human, not a robot, and that goal drove a whole pile of downstream design decisions.

The entire program is a single main.py with the GUI, recording, playback, settings, and the background listener thread all crammed in. On personal projects I don’t like breaking things into pieces. Under the hood it uses pynput to capture mouse movement, clicks, the scroll wheel, and the keyboard; you can record just the mouse, just the keyboard, or everything. The event sequence is saved straight to JSON dropped into ./macros/, human-readable and editable, which is why adding a macro editor page later went smoothly: you just add, delete, or modify entries one by one, no wrestling with binary. The interface is PyQt5 with PyQt-Fluent-Widgets, and notifications go through winotify to pop native ones, so even minimized you know whether it’s recording or playing.

Anti-detection is the focus. Adaptive random delays are inserted between events to shake a human feel into the rhythm; it’s on by default but can be turned off. Playback has two modes: press once to start and press again to stop, or hold to play and release to stop. Gaming and working through spreadsheets have a different feel, so take your pick. Process locking uses psutil, responding only when the specified process is active, to avoid accidental triggers. A single recording is capped at 300 seconds to keep you from forgetting to hit stop and ending up with a hundred-megabyte monster macro.

The most classic pitfall I hit was global listening working intermittently. I dug into it for ages and it turned out to be a permissions issue. Capturing global input on Windows requires running as administrator, otherwise pynput just can’t grab anything in certain foreground windows. Running it is simple: install the dependencies and python main.py, the directory is auto-generated on first run. The stack is Python 3.9+, PyQt5, pynput, psutil, winotify, and pywin32, all in requirements.txt.