🖱️
Mouse Control
Move, click, scroll with precise pixel coordinates via CLI or HTTP API
Control mouse & keyboard via CLI, HTTP API, or as a Zig library
# Build the project
zig build
# Run interactive CLI
zig build run
# Start with HTTP API on port 4000
zig build run -- --http
# Run tests
zig build test> m500-300 # Move mouse to (500, 300)
> c100-100 # Click at (100, 100)
> sc5 # Scroll up 5 units
> g # Get mouse position
> rec # Start recording
> stop # Stop recording
> save macro.json # Save to file
> play # Replay events# Get mouse position
curl http://localhost:4000/api/position
# Move mouse
curl -X POST http://localhost:4000/api/move -d '{"x":800,"y":400}'
# Take screenshot
curl http://localhost:4000/api/screenshot > screen.bmpconst zmouse = @import("zmouse");
// Get screen dimensions
const screen = try zmouse.input.getScreenDimensions();
// Move and click
try zmouse.input.moveMouse(500, 300, screen);
zmouse.input.leftClick();
// Recording
var recorder = zmouse.Recorder.init(allocator);
defer recorder.deinit();
try recorder.startRecording();
// ... user actions ...
recorder.stopRecording();