Windows system-tray mouse recorder. Starts paused every time. No auto-start, network upload, keystrokes, screenshots, clipboard, or application/window names.
Recordings and generated exports are local data and are not included in the repository. The application creates their folders when needed.
- Place this folder wherever you like. Any folder works;
everything the recorder writes stays inside it (
recordings\,microbot-exports\,recorder.log). - Run
Setup.batonce. Needs Python 3.10 or newer plus internet. It usespythonfrom PATH or falls back topy -3, and it rebuilds.venvif that folder came from another PC. - Double-click
Launch Recorder.bat.
Never move .venv between PCs: it records an absolute path to the Python that
created it. If a window says No Python at 'C:\Users\...', delete .venv and
run Setup.bat again. Launch Recorder.bat now checks this and tells you
instead of failing silently.
upload_data.py is intentionally not part of this copy, so Compile Flows.bat
compiles and generates the Java file but uploads nothing.
- Run
Setup.batonce (requires Python 3.10+ and internet for dependencies). - Double-click
Launch Recorder.bat. - Find the mouse icon in the tray, possibly under the hidden-icons arrow.
- Right-click → Start recording. The icon turns red.
- Pause / save recording ends the session and turns the icon gray.
- Open recordings folder shows your files. Exit saves and quits.
Recording captures mouse moves, button presses/releases and scrolling across
applications, with monotonic timestamps and absolute desktop coordinates. Each
Start creates a separate JSONL file in recordings next to this README. Negative
coordinates are valid on multi-monitor desktops. No keyboard hook is installed.
Capture rate depends on Windows, hardware, and the input library; this is not raw hardware polling data. Desktop geometry is captured at session start; restart recording after changing monitors/DPI. Elevated apps or the secure desktop may not be captured. No need to run as administrator for normal applications.
Mouse data can still reveal activity and click patterns. Pause before sensitive
work and only record your own activity or with permission. Files are local,
unencrypted, and are not automatically deleted or size-limited. Long sessions
can produce large files. Delete unwanted recordings yourself. Pending data is
flushed about every half-second; crashes/power loss can lose buffered events.
Input overloads are counted in the final end record as dropped.
Example (timestamp t is seconds since this session began):
{"t":0.123456,"type":"move","x":500,"y":300}
{"t":0.345678,"type":"click","x":500,"y":300,"button":"left","pressed":true}There are two separate workflows: export a session as MicroBot-style JSONL for analysis or custom integration, or compile recordings into movement speed profiles for a compatible MicroBot source checkout. Neither workflow modifies an installed MicroBot client automatically.
-
Record and save one or more sessions using the tray menu.
-
Choose Compile all recordings → my_flows.json in the tray, or run
Compile Flows.batafter setup. Both generate files inmicrobot-exports\:my_flows.jsoncontains profiles, statistics and a Java snippet;FlowTemplates.javacontains generated templates. -
For a compatible MicroBot source checkout, review and back up its existing
FlowTemplates.java, then copy the generated file to:runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/mouse/naturalmouse/util/FlowTemplates.java -
Rebuild MicroBot using its build instructions. The included batch file suggests
mvn package -pl runelite-client -am -DskipTests; the appropriate build command and compatibility depend on your MicroBot version.
The compiler extracts movement segments from raw JSONL recordings and converts them to relative speed profiles, not complete paths or game actions. By default it uses 20 buckets and keeps at most 20 representative profiles. The Java generator assigns up to nine profiles to named template methods and uses fallback values for remaining slots. Review and test the generated source against your checkout: compatibility and runtime behavior are not guaranteed.
For compiler options, run .venv\Scripts\python.exe compile_flows.py --help.
Running the compiler directly generates JSON; run
.venv\Scripts\python.exe generate_java.py afterward to generate Java.
After pausing, choose Export last session for MicroBot in the tray menu.
This produces a separate .microbot.jsonl file using the current upstream
MicroBot MouseMacroRecorder JSONL structure: start record followed by wrapped
event records, MOVE/DOWN/UP/SCROLL, integer millisecond offsets and
LEFT/MIDDLE/RIGHT buttons. Original high-resolution timing is retained in
the raw file. Unknown modifier state and game menu entries are null, not invented.
Source schema inspected: https://github.com/chsami/Microbot/blob/main/runelite-client/src/main/java/net/runelite/client/plugins/microbot/mouserecorder/MouseMacroRecorderPlugin.java
Format compatibility is not automatic integration. MicroBot's mouse movement engine does not automatically learn from or replay these files. No installed client JAR has been changed, and importing into your installed version has not been tested. A trajectory-dataset reader or custom integration is still needed.
Normal exports explicitly mark coordinateSpace: desktop and leave canvas
dimensions/scale unknown. Do NOT directly replay desktop positions in the game.
For a recording taken with a fixed game-canvas rectangle, export with its real
desktop origin and dimensions, for example:
.venv\Scripts\python.exe export_microbot.py recordings\YOUR-SESSION.jsonl --canvas 100 200 800 600 --output recordings\canvas-export.jsonlThis subtracts the canvas origin and excludes outside events. The numbers above are examples, not your actual canvas bounds. Stretched/DPI-scaled game canvases need additional verified scaling, and moving/resizing the window invalidates fixed bounds. Filtering can leave incomplete button gestures at the edges; these exports are datasets, not validated executable macros. Scroll values are wheel notches (Y inverted to Java's down-positive convention), not Java's system-configured scroll-amount multiplier. Horizontal scroll is retained.
General PC movements can supply trajectories and timing for later analysis; they cannot supply OSRS targets, menu actions, or game-specific context. This recorder does not replay inputs.
Tests: .venv\Scripts\python.exe -m unittest -v