Docs — Repio

Repio Documentation

Macro Recorder, Editor & Player — v5.3.0 (Enterprise Edition)
Single-file Python/tkinter application

Desktop application for recording, editing and playing back mouse and keyboard macros. Single Python file, GUI on tkinter, input capture via pynput.
This documentation covers Enterprise Edition (v5.3.0). For the free Community Edition see the Community Edition section below or download page.

#Community Edition FREE

Community Edition (v3.3) is a free, open-source single-file Python application available on GitHub. It provides core macro recording and playback functionality.

Features available in PRO only: Web Hooks (HTTP URL includes), Save As, Unsaved changes tracking, Settings dialog, Column management, Cumulative timeline, Post-script actions, Configurable hotkeys, Build versioning, Run external program, Window persistence, Launch on login.

⬇ Download Community Edition from GitHubCompare editions

#1.1 Recording

Records all user actions in real-time:

Hotkey: F5 (toggle — start/stop recording)

#1.2 Playback

Lazy playback engine with memory optimization:

Hotkeys: F8 Play • F6 Stop • Esc Stop

#1.3 Pause / Resume

#1.4 Breakpoints Community

#1.5 Bookmarks Community

#1.6 Loops

#1.7 Include Files

#1.8 Editing

TreeView table with 10 columns: #, Type, X, Y, Btn, Key, Delay, Loops, File, Comment

#1.8b Column Management PRO

#1.8c Settings PRO

#1.8d Run External Program PRO

#1.8e Shell Script PRO

#1.8f Post-Script Actions PRO

#1.8g Conditional Actions Enterprise

Pixel-color condition: checks screen pixel at (x, y) and branches on match.

if_color  x=540 y=320  color=#FF0000  tolerance=10
  pause  200
else
  pause  50
end_if

#1.8h Variables Enterprise

Runtime variable store shared across all nested loops and includes. Reference syntax: $varname. The legacy $_varname_ syntax is still accepted for backward compatibility.

loop_start  100  i          ← variable "i" = 1, 2, …, 100
  set_var  result=$i*2
  if_var  $i > 50
    exit
  end_if
  type  Step $i: result=$result
  pause  $result          ← delay_ms supports expressions
loop_end

#1.8i Goto & Labels Enterprise

Named jump points for non-linear flow. Typical use: error recovery — detect failure via pixel color, restart from beginning.

label  start
  …actions…
  if_color  x=200 y=100  color=#0000FF  dx=5
    goto  start          ← restart on failure
  end_if

#1.8j Comment / Uncomment Rows Enterprise

Temporarily disable actions without deleting them. Commented rows are skipped during playback and shown as gray overstrike text.

#1.8k Screenshot OCR Enterprise

Capture the screen and recognize text using the native OS OCR engine. No external software required.

screenshot  check|$screen_text
if_var  like("Login", $screen_text)
  type  [email protected]
end_if

#1.8l like() Function Enterprise

Case-insensitive substring count for use in if_var conditions.

#1.9 Clipboard & History

#1.11 File Operations

CSV format with 13 header fields, UTF-8 encoding.

#1.11b Multi-Tab Support PRO

#1.11c Quick List Enterprise

A collapsible macro library sidebar on the left side of the main window. Stores a global list of .repio files with optional hotkeys.

Settings key: macro_library — list of {file, hotkey, name} objects stored in settings.json

#1.11d Per-Macro Hotkeys Enterprise

Settings → Macro Hotkeys (7th tab) — 10 configurable slots, each mapping a key combo to a .repio file path.

#1.11e CLI & Headless Mode Enterprise

Enterprise edition supports running scenarios directly from the command line without opening the GUI window.

Basic usage

Repio-Enterprise.exe --run scenario.repio
Repio-Enterprise.exe --run scenario.repio --output-dir C:\screenshots
Repio-Enterprise.exe --run scenario.repio --silent
Repio-Enterprise.exe --help

Options

OptionDescription
--run FILEPlay a .repio or .csv file headlessly (no GUI)
--output-dir DIRDirectory for screenshot-action output (default: current directory)
--silentSuppress startup hints and pause/stop notification windows — for use in scripts and scheduled tasks
--helpPrint help and exit

Headless controls

Global hotkeys remain active during --run. Keys are read from Settings (same as GUI mode):

On startup (without --silent) Repio prints the active key bindings, for example:

Playing: daily.repio  (142 actions)
  Controls: [F7] Pause/Resume  [F6] Stop  [Ctrl+C] Abort

When playback is paused (hotkey or breakpoint) a small popup appears — click OK to resume. Use --silent to skip the popup (playback resumes immediately after the pause callback returns — i.e. pausing is still possible but the window is suppressed).

Exit codes

Automation example (Task Scheduler / bat)

Repio-Enterprise.exe --run C:\tasks\daily.repio --silent
if %errorlevel% neq 0 echo Playback failed

#1.12 Versioning PRO

#1.14 Web Hooks PRO

Include macro actions from a remote server via HTTP/HTTPS.

Example URL: https://server.com/hook?filename=main&ip=192.168.1.5&line=42

#Hotkeys Reference

KeyActionContext
F5Start/Stop RecordingGlobal
F6Stop AllGlobal
F7Pause / ResumeGlobal
F8PlayGlobal
EscStop AllGlobal
F9Toggle BreakpointGlobal
Ctrl+NNew FileGlobal
Ctrl+OOpen FileGlobal
Ctrl+SSaveGlobal
Ctrl+Shift+SSave AsGlobal
Ctrl+ZUndoGlobal
Ctrl+YRedoGlobal
Ctrl+C/X/VCopy / Cut / PasteGlobal
Ctrl+ASelect AllGlobal
Ctrl+BToggle BookmarkGlobal
Ctrl+FSearchGlobal
F3Find NextGlobal
DelDelete SelectedGlobal
InsAdd ActionGlobal
PgUp/PgDnMove Selection (±15 rows)TreeView
Double-click / EnterEdit ActionTreeView
Right-clickContext MenuTreeView
Ctrl+TNew TabGlobal
Ctrl+WClose TabGlobal
Ctrl+TabNext TabGlobal
Ctrl+Shift+TabPrevious TabGlobal
Ctrl+1–9Switch to Tab NGlobal
Middle-click on tabClose TabTab Bar
Del in Quick ListRemove entry (with confirm)Quick List
Double-click / Enter in Quick ListOpen macro in tabQuick List

#CSV Format

UTF-8 encoding, comma delimiter, first row is headers. 13 fields:

FieldTypeDescription
typestringAction type
xint/floatMouse X coordinate
yint/floatMouse Y coordinate
buttonstringMouse button: left, right, middle
key_codestringKey code: Key.shift, a, B, 1, etc.
delay_msfloatDelay before action (ms), format "%.4f"
loop_countintRepeat count for loop_start
file_pathstringPath or URL for include
dxintHorizontal scroll delta
dyintVertical scroll delta
commentstringComment text
is_bookmarkstringTrue / False
is_breakpointstringTrue / False
is_commentedstringTrue / False — skipped during playback

#Action Types

TypeDescriptionFields Used
moveMove cursorx, y, delay_ms
mousedownPress mouse buttonx, y, button, delay_ms
mouseupRelease mouse buttonx, y, button, delay_ms
clickClick (press+release)x, y, button, delay_ms
scrollScroll wheelx, y, dx, dy, delay_ms
keydownPress keykey_code, delay_ms
keyupRelease keykey_code, delay_ms
pauseDelaydelay_ms
waitAlias for pausedelay_ms
loop_startLoop beginloop_count, comment
loop_endLoop endcomment
includeInclude file/URLfile_path, comment
run_programRun external executable; append |$var to args to capture stdoutfile_path (exe, supports $var), comment (args)
runAlias for run_programfile_path, comment
scriptInline shell command; blocking + stdout capture if output variable setcomment (command), file_path (output variable, optional)
typeType string (unicode-safe)comment (text), delay_ms
screenshotCapture full screen; OCR if variable specifiedcomment (label|$varname)
if_colorBranch on pixel color at (x,y)x, y, comment (#RRGGBB), dx (tolerance)
if_varBranch on variable conditioncomment (expression, e.g. $i > 3)
elseElse branch for if_color / if_var
end_ifClose if block
set_varAssign variable (side-effect only)comment (name=expression)
breakExit innermost loop
exitStop all playback
labelNamed position marker (not executed)comment (name)
gotoJump to labelcomment (label name)
commentComment (not executed)comment

#Architecture

Threading Model

Main Thread (UI)          ← tkinter mainloop
  _process_queue()          root.after(10ms) polling
  refresh_table()
  all UI callbacks

pynput listeners          ← Background daemon threads
  mouse.Listener             Write events to queue.Queue
  keyboard.Listener

Playback Thread           ← threading.Thread (daemon)
  player.play()              Reads from generator
  virtual clock

Key Classes

ClassPurpose
UnifiedRecorderRecords mouse & keyboard events via pynput into Queue
IncludeCacheLRU cache (32 entries) for included files & URLs
lazy_action_iteratorGenerator: recursively expands loops, includes, conditionals & variables
VariableStoreRuntime key-value store; $name interpolation, numeric & bool expression eval
MacroPlayerPlayback engine with virtual clock & state tracking
HistoryManagerUndo/Redo stack (50 states, deep copy)
CSVHandlerSave/Load CSV with 13-field format
EditDialogModal dialog for editing individual actions
MacroAppMain application class, coordinates all components

#Constants

ConstantValueDescription
WINDOW_SIZE1200x800Default window size
HISTORY_LIMIT50Max undo/redo states
MAX_INCLUDE_DEPTH20Max include nesting
IncludeCache.max_size32Max cached files
URL_CACHE_TTL60sURL response cache lifetime
WEB_HOOK_TIMEOUT3sHTTP request timeout
Queue poll interval10msEvent queue polling rate
Sleep granularity10msMin sleep step in playback loop
Page step15 rowsPgUp/PgDn step size

#Dependencies

python >= 3.7
tkinter, csv, time, threading, queue, copy,
os, json, io, webbrowser, urllib.request,
urllib.parse, urllib.error, socket          # all stdlib

pynput                                     # pip install pynput (only external dep)
Single external dependency: pynput. Everything else is Python standard library.