Skip to main content

A tool to record and replay mouse and keyboard actions

Project description

Macro Generator

A tool for recording and replaying mouse and keyboard actions.

Features

  • Record mouse movements, clicks, and keyboard inputs
  • Pause and resume recording
  • Generate macros to replay recorded actions
  • Single execution mode (triggered by keypress)
  • Loop execution mode (continuous replay)
  • Pause/resume during playback
  • Manage recordings and macros (list, run, remove)

Installation

From source

  1. Clone the repository:

    git clone https://github.com/0xTristo/macro-gen.git
    cd macro-gen
    
  2. Install with pip:

    pip install .
    
  3. System-wide installation (requires root privileges):

    sudo pip install .
    

Dependencies

Macro-Gen requires the following Python packages that will be automatically installed:

  • pynput: For capturing and simulating keyboard and mouse inputs
  • configparser: For reading configuration files

System Requirements

  • Python 3.6 or higher
  • X Window System (on Linux) for mouse and keyboard control
  • Administrator privileges may be required on Windows
  • For Mac, accessibility permissions will need to be granted

Quick Start

Recording

To start recording mouse and keyboard actions:

macro-gen record

Controls:

  • F9: Start/stop recording
  • F8: Pause/resume recording
  • ESC: Exit program

Generating Replay Script

To generate a replay script from a recording:

macro-gen generate

You'll be prompted to select a recording file, choose execution mode, and configure trigger keys.

Managing Recordings and Macros

List all recorded action files:

macro-gen list-history

List all generated macro scripts:

macro-gen list-macros

Run a specific macro:

macro-gen run macro_name

Remove a specific macro:

macro-gen rm-macro macro_name

Remove a specific recording:

macro-gen rm-recording recording_name

File Locations

  • Configuration: ~/.config/macro-gen/config.conf
  • Macros: ~/.local/share/macro-gen/macros/
  • Recordings: ~/.local/share/macro-gen/history/

Example Configuration File

[recorder]
mouse_trps = 50

[playback]
default_trigger_key = f10
default_pause_key = f8

[paths]
history_dir = history
macros_dir = macros

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macro_gen-0.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macro_gen-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file macro_gen-0.1.0.tar.gz.

File metadata

  • Download URL: macro_gen-0.1.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for macro_gen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5e47df90e62e26ce230150c53dcf55379e79824ce9d62632dc7ad28ebfc84141
MD5 be0f2d8579ed8dfbf7d8a3b1e5536082
BLAKE2b-256 47c937daac8bad9cfdfef0b4c620c738b1f5fb0c9e32f01b21e7f71f54760cbe

See more details on using hashes here.

File details

Details for the file macro_gen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: macro_gen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for macro_gen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 908097292a0ae750013d96d173aca523255cdf1126c1a9a39b5361a3b5ba1714
MD5 f165af56cd5bfee4601ee4b8173e520e
BLAKE2b-256 6153ad2d17e3b7f8be103e43efb11226c37dd25e9ecf2901e5e99e5873f445d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page