Skip to content

kevinypfan/auto-clicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Clicker - TinyTask Clone in Rust

A minimal PC automation tool inspired by TinyTask, built in Rust with a modern GUI. Record mouse and keyboard actions and play them back with precise timing.

Features

  • Record & Playback: Capture mouse clicks, movements, and keyboard inputs with precise timing
  • Adjustable Speed: Control playback speed from 0.1x to 5.0x
  • Save & Load Macros: Persistent storage of recorded macros in JSON format
  • Minimal GUI: Clean, simple interface with essential controls
  • Cross-Platform: Built with Rust for Windows, macOS, and Linux
  • Always on Top: Keep the window visible while working with other applications

Installation

  1. Make sure you have Rust installed: https://rustup.rs/
  2. Clone this repository
  3. Build and run:
    cargo build --release
    cargo run --release

Usage

Recording a Macro

  1. Enter a name for your macro in the text field
  2. Click the "🔴 Record" button
  3. Perform the actions you want to automate
  4. Click "⏹ Stop Recording" when finished
  5. Click "💾 Save" to save the macro

Playing Back a Macro

  1. Select a saved macro from the list or load a previously recorded one
  2. Adjust the playback speed if desired (1.0x = normal speed)
  3. Click "▶ Play" to start playback
  4. Click "⏹ Stop Playback" to stop early if needed

Managing Macros

  • Load: Select a macro from the list and click "📂 Load"
  • Delete: Select a macro and click "🗑 Delete" to remove it permanently
  • Refresh: Click "🔄 Refresh" to update the macro list

Macro Storage

Macros are saved as JSON files in:

  • macOS/Linux: ~/.auto-clicker/macros/
  • Windows: %USERPROFILE%\.auto-clicker\macros\

Each macro contains:

  • Name and creation timestamp
  • Complete sequence of recorded events with precise timing
  • Total duration information

Safety Features

  • Emergency stop capability during recording/playback
  • Input validation and error handling
  • Non-destructive macro management
  • Automatic file collision prevention

System Requirements

  • Permissions: The application needs accessibility permissions to capture and simulate input events
  • macOS: Grant accessibility permissions in System Preferences > Security & Privacy > Privacy > Accessibility
  • Linux: May require running with appropriate permissions for input simulation
  • Windows: Usually works without additional setup

Build from Source

# Clone the repository
git clone <repository-url>
cd auto-clicker

# Install dependencies and build
cargo build --release

# Run the application
cargo run --release

Dependencies

  • rdev: Cross-platform input capture and simulation
  • egui/eframe: Modern immediate mode GUI framework
  • tokio: Async runtime for event handling
  • serde/serde_json: Macro serialization and storage
  • chrono: Timestamp handling
  • dirs: Cross-platform directory access

Architecture

The application is structured into several modules:

  • events: Core data structures for input events and macro recordings
  • recorder: Input capture using rdev with global callback system
  • player: Event playback with timing accuracy and speed control
  • storage: File-based macro persistence with JSON format
  • gui: egui-based user interface with real-time updates

Similar Projects

This project was inspired by TinyTask, the 36KB Windows automation utility. Our Rust implementation provides:

  • Cross-platform compatibility
  • Modern GUI framework
  • Type-safe event handling
  • Better error handling and recovery
  • JSON-based macro storage for easier debugging

License

This project is open source. Check the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Known Limitations

  • Global input listening may require system permissions
  • Playback accuracy depends on system performance
  • Some complex interactions may not be perfectly reproducible
  • Screen coordinate recording is relative to current display configuration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published