Repio Documentation
Macro Recorder, Editor & Player — v5.0.x (PRO Edition)
Single-file Python/tkinter application
#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.
- Mouse & keyboard recording — clicks, movement, scroll, keydown/keyup
- Precise playback engine — lazy generator with virtual clock
- CSV editor with loops — TreeView table, loop_start/loop_end pairs
- Include files — local CSV includes with LRU cache (32 entries)
- Undo / Redo — 50-state history with deep copy
- Breakpoints (F9) — toggle, red highlight, auto-stop during playback
- Bookmarks (Ctrl+B) — toggle, cyan highlight, navigate with wrap-around
- Search in comments (Ctrl+F / F3) — case-insensitive, cyclic
- Open source (Python) — single
repio-dev-comm.pyfile, MIT-friendly
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 GitHub • Compare editions
#1.1 Recording
Records all user actions in real-time:
- Mouse movement — coordinates (x, y) with high-precision timestamps (
time.perf_counter()) - Mouse clicks — separate mousedown/mouseup, buttons: left, right, middle
- Scroll wheel — scroll with delta (dx, dy) and coordinates
- Keyboard — separate keydown/keyup for each key (including Shift, Ctrl, Alt, function keys, etc.)
- Auto pause insertion —
pausewith precisedelay_msbetween events - Move collapse — consecutive move events merged into one (noise reduction)
- Start/End markers — auto-inserted comments
--- Start Rec [N] --- - Record from position — insert recording after selected row
- Filter hotkeys — F6 (stop) filtered from recording
Hotkey: F5 (toggle — start/stop recording)
#1.2 Playback
Lazy playback engine with memory optimization:
- Generator engine —
lazy_action_iterator()uses Python generators andyield fromfor recursive loop/include expansion. Memory: O(depth) instead of O(total_actions) - Virtual clock — precise timing via
time.perf_counter()with virtual accumulator. Sleep granularity: 10ms - Position context — generator returns
(action, context)with file, line, loop stack info - Status bar — updates every 5 actions with current action number, file, loop iterations
- Cleanup on stop — all held keys and mouse buttons automatically released
- Duration display — shows expected duration before start
Hotkeys: F8 Play • F6 Stop • Esc Stop
#1.3 Pause / Resume
- F7 — toggle pause/resume
- Pause button in toolbar changes appearance (sunken + orange background)
- Generator state preserved in memory — resumes from exact position
- Play button always shows ▶ (never changes to "Continue")
#1.4 Breakpoints Community
- F9 or context menu to toggle
- Red highlight (IndianRed
#CD5C5C) with white text - Player auto-stops at breakpoint lines
- Continue with F7 or F8
- Stored in CSV as
is_breakpointfield
#1.5 Bookmarks Community
- Ctrl+B or context menu to toggle
- Cyan highlight (
#E0FFFF) - Navigate with toolbar buttons with wrap-around
- Stored in CSV as
is_bookmarkfield
#1.6 Loops
- Select rows → Insert > Loop → enter repeat count
- Structure:
loop_start(withloop_count) andloop_endpair - Nested loops supported with correct level matching
- Lazy expansion during playback (no memory copies)
- Status display: "Loop 3/10 > 2/5" for nested loops
#1.7 Include Files
- Insert > Include File → choose local CSV or HTTP URL (HTTP/URL includes — PRO only)
- Recursive inline playback via generator
- Duration annotation auto-calculated in comment (PRO only)
- LRU cache (32 entries) with mtime check for files, TTL 60s for URLs
- Max depth: 20 levels (circular include protection)
- Status shows:
[filename.csv:15]— current file and line
#1.8 Editing
TreeView table with 10 columns: #, Type, X, Y, Btn, Key, Delay, Loops, File, Comment
- Double-click or Enter opens EditDialog
- EditDialog: modal window with fields for all action properties, "Record Key" button for live key capture
- Move rows with ⬆/⬇ toolbar buttons
- Multi-select: Shift+Click, Ctrl+Click
- Page Up/Page Down — move selection by 15 rows
- Ctrl+Up/Ctrl+Down — move selected rows up/down
- Shift+Up/Shift+Down — extend selection (standard behavior)
#1.8b Column Management PRO
- View > Column Settings — reorder columns, toggle visibility
- Timeline column — cumulative duration (running total) left of row number
- Delay column displays in short format:
5.4s,1m 5.0s - Column order and visibility persisted in
settings.json
#1.8c Settings PRO
- Tools > Settings — opens 4-tab dialog
- Recording: min mouse movement filter (pixels), ignore multiple modifier keys
- Playback: pause on real mouse movement, pause on keyboard, post-script action
- Hotkeys: reconfigure Start/Stop/Play/Pause keys
- General: launch on login, start minimized, auto-open last file
#1.8d Run External Program PRO
- Insert > Run Program — select executable and arguments
- Creates
run_programaction type - During playback: launches the program via
subprocess.Popen
#1.8e Post-Script Actions PRO
- After script completes: None, Lock, Logout, Restart, Shutdown
- Configurable in Settings > Playback tab
- Windows-only: uses
ctypesandshutdowncommands
#1.9 Clipboard & History
- Ctrl+C/Ctrl+X/Ctrl+V — Copy/Cut/Paste with deep copy
- Ctrl+Z/Ctrl+Y — Undo/Redo (50 states max)
- Ctrl+A — Select All
#1.10 Search Community
- F3 / Ctrl+F — search in comment fields
- Case-insensitive, cyclic (wraps around)
- Remembers last query
#1.11 File Operations
CSV format with 13 header fields, UTF-8 encoding.
- Ctrl+N New • Ctrl+O Open • Ctrl+S Save • Ctrl+Shift+S Save As
- Recent Files submenu (up to 10 files)
- Auto-open last file on startup
- Unsaved changes tracking: asterisk (*) in title, confirmation dialog on close
#1.12 Versioning PRO
- Base version:
APP_VERSION_BASE = "4.0" - Build index: auto-increment on each run, stored in
build_index.json - Full version:
4.0.Ndisplayed in window title and About dialog
#1.14 Web Hooks PRO
Include macro actions from a remote server via HTTP/HTTPS.
- URL in
file_pathfield ofincludeaction - GET request with query params:
?filename=...&ip=...&line=... - Timeout: 3 seconds • User-Agent:
Repio/{version} - Response: CSV with compatible headers (13 fields)
- Cache: TTL 60 seconds for URL responses
- Preview Hook: context menu to preview URL content in separate window
https://server.com/hook?filename=main&ip=192.168.1.5&line=42#Hotkeys Reference
| Key | Action | Context |
|---|---|---|
| F5 | Start/Stop Recording | Global |
| F6 | Stop All | Global |
| F7 | Pause / Resume | Global |
| F8 | Play | Global |
| Esc | Stop All | Global |
| F9 | Toggle Breakpoint | Global |
| Ctrl+N | New File | Global |
| Ctrl+O | Open File | Global |
| Ctrl+S | Save | Global |
| Ctrl+Shift+S | Save As | Global |
| Ctrl+Z | Undo | Global |
| Ctrl+Y | Redo | Global |
| Ctrl+C/X/V | Copy / Cut / Paste | Global |
| Ctrl+A | Select All | Global |
| Ctrl+B | Toggle Bookmark | Global |
| Ctrl+F | Search | Global |
| F3 | Find Next | Global |
| Del | Delete Selected | Global |
| Ins | Add Action | Global |
| PgUp/PgDn | Move Selection (±15 rows) | TreeView |
| Double-click / Enter | Edit Action | TreeView |
| Right-click | Context Menu | TreeView |
#CSV Format
UTF-8 encoding, comma delimiter, first row is headers. 13 fields:
| Field | Type | Description |
|---|---|---|
type | string | Action type |
x | int/float | Mouse X coordinate |
y | int/float | Mouse Y coordinate |
button | string | Mouse button: left, right, middle |
key_code | string | Key code: Key.shift, a, B, 1, etc. |
delay_ms | float | Delay before action (ms), format "%.4f" |
loop_count | int | Repeat count for loop_start |
file_path | string | Path or URL for include |
dx | int | Horizontal scroll delta |
dy | int | Vertical scroll delta |
comment | string | Comment text |
is_bookmark | string | True / False |
is_breakpoint | string | True / False |
#Action Types
| Type | Description | Fields Used |
|---|---|---|
move | Move cursor | x, y, delay_ms |
mousedown | Press mouse button | x, y, button, delay_ms |
mouseup | Release mouse button | x, y, button, delay_ms |
click | Click (press+release) | x, y, button, delay_ms |
scroll | Scroll wheel | x, y, dx, dy, delay_ms |
keydown | Press key | key_code, delay_ms |
keyup | Release key | key_code, delay_ms |
pause | Delay | delay_ms |
loop_start | Loop begin | loop_count, comment |
loop_end | Loop end | comment |
include | Include file/URL | file_path, comment |
comment | Comment (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
| Class | Purpose |
|---|---|
UnifiedRecorder | Records mouse & keyboard events via pynput into Queue |
IncludeCache | LRU cache (32 entries) for included files & URLs |
lazy_action_iterator | Generator: recursively expands loops & includes |
MacroPlayer | Playback engine with virtual clock & state tracking |
HistoryManager | Undo/Redo stack (50 states, deep copy) |
CSVHandler | Save/Load CSV with 13-field format |
EditDialog | Modal dialog for editing individual actions |
MacroApp | Main application class, coordinates all components |
#Constants
| Constant | Value | Description |
|---|---|---|
WINDOW_SIZE | 1200x800 | Default window size |
HISTORY_LIMIT | 50 | Max undo/redo states |
MAX_INCLUDE_DEPTH | 20 | Max include nesting |
IncludeCache.max_size | 32 | Max cached files |
URL_CACHE_TTL | 60s | URL response cache lifetime |
WEB_HOOK_TIMEOUT | 3s | HTTP request timeout |
| Queue poll interval | 10ms | Event queue polling rate |
| Sleep granularity | 10ms | Min sleep step in playback loop |
| Page step | 15 rows | PgUp/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)