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, or choose Start tagged session. The icon turns red. Tags are labels you choose; they do not detect OSRS focus or prevent recording outside the game.
- Pause / save recording ends the session and turns the icon gray.
- Open recordings folder shows your files. Exit saves and quits.
Choose Set capture area (game canvas)… and enter the game canvas rectangle in
desktop pixels as left, top, width, height. From then on:
- only events inside that rectangle are stored, translated so its top-left corner
is
0,0; - the session metadata records the rectangle and
coordinateSpace: canvas; - the rectangle is saved in
recorder-settings.jsonand reused by later sessions; - Clear capture area returns to full-desktop recording.
The recorder never reads window titles, so it cannot find the canvas itself: you supply the numbers, and moving, resizing or DPI-rescaling the game invalidates them (set the area again). Events outside the area are ignored rather than recorded, and the save notification reports how many were skipped. Canvas-aware sessions analyse normally and do not need the canvas export step; that export rejects a second rectangle rather than subtracting twice. Recording only the canvas still cannot capture OSRS menu entries or game state — use the Microbot import for that.
With recording paused, choose Analyze recordings and open report. The local
report opens in your browser and shows segment counts, distance groups, sample
median duration, estimated speed, straightness, overshoot, example normalized
paths and speed plots.
Choose Analyze one activity to include only sessions you labelled with that
activity. The results go into microbot-exports/activities/<activity>/ so they
do not overwrite the all-session report. Previously untagged recordings are
excluded from activity-specific reports. For command-line analysis, --tag bank
selects a tag and --min-quality 70 filters by the heuristic quality score;
use --output to choose a separate output folder.
The analysis also writes microbot-exports/mouse-paths.json, containing sampled
normalized paths and 20-bucket speed curves grouped as short (<100 px), medium
(100–399 px), or long (400+ px). Each group retains a reproducible sample of at
most 2,000 segments; medians and rates describe those samples. Original desktop coordinates are not included
in those normalized paths. The original raw recordings remain untouched.
The analyzer splits movements after a 250 ms idle gap and on clicks or scrolling, skips button-held dragging, and filters very short, sparse, unusually fast, or invalid segments. It rejects an entire session when its end record reports dropped events. The 0–100 quality score is a heuristic based on sample count, timing gaps and path length; it is not a measure of human likeness. Correction and overshoot are approximate geometric indicators. These filters cannot prove data quality: focus changes, monitor boundaries are not detected; sessions missing an end record are excluded. Distance categories are suggestions, not a calibrated model of your setup.
Analysis can take substantial time for long recordings; it checks each session's
header and final record, then streams its body once. From a command
line, run .venv\Scripts\python.exe analyze_recordings.py. Reports and paths
are local files; analysis does not replay input or upload data. It also writes
my_flows-distance.json when accepted segments exist. This contains a legacy
flows array and optional distance-group indexes; a bridge must support those
indexes to select by distance. Empty analysis leaves any previous distance file
unchanged. The tray compiler still writes my_flows.json; if a plugin is
configured for my_flows-all.json, compiling here does not refresh that file.
The normalized paths are for offline analysis, not replay.
To inspect how one recorded shape would transform between two points, run, for
example, .venv\Scripts\python.exe preview_path.py microbot-exports\mouse-paths.json --group medium --index 0 --start 0 0 --end 300 200. It prints reconstructed
coordinates and relative timestamps; it does not move the cursor or click.
The distance export requests a 5% mix from the original flow manager via
original_flow_fraction; only bridges supporting that optional field use it.
The original manager may itself be custom. Change the value from 0 to 0.5 before
loading the file if your compatible bridge supports this setting.
To use the all-session analysis with Ben scripts configured for the default
my_flows-all.json, choose Use analyzed flows in Ben scripts… and confirm.
The recorder validates the profile, saves a timestamped backup of the existing
file, then replaces it atomically. No profile is activated automatically. Reload
the relevant script if necessary; it must have custom mouse data enabled. Older
plugins may use the flat flows but ignore distance groups and mix settings.
Apply recorded movement shape toggles the optional apply_shape flag in that
installed profile. The analysis also stores short/medium/long average sideways
offset curves (shape_curves), measured as a fraction of move distance against
progress along the straight line. A compatible bridge turns those into the same
bow Microbot's sine provider produces, capped at 12% of the distance, while the
per-movement random sign still varies. It is not a replay of recorded positions,
does not move to recorded coordinates, and has not been verified in game;
leave it off, or turn it off if a movement looks wrong. Changing the flag needs a
script reload or client restart.
To include actual OSRS canvas events, first stop Microbot's Mouse Macro Recorder, then select Import Microbot game recording… in this tray app and choose its finished JSONL file. Microbot's recorder provides canvas-relative coordinates and game menu context; the desktop recorder does not. The import dialog asks whether to include menu entries and modifier state, which can reveal sensitive in-game information. Choosing No omits those fields. Imported files stay local, are included in all-session analysis, and are not automatically tagged. Microbot's source does not record a dropped-event counter, so import cannot establish whether its original capture lost events; the report counts these sessions separately. Do not import the same session twice. Source files must be fully stopped before import; changing files are rejected where detected.
The CLI equivalent is python import_microbot.py PATH, optionally with
--include-context and --tag bank. A source recorded while a script was active
may include automated events; neither recorder proves who generated an event.
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. The tray option Export last session with canvas
bounds… asks for left, top, width, height and writes a separate canvas export
without overwriting the desktop export. These bounds must be measured for the
whole session; the application does not automatically locate the canvas. You
can also use the command line, 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