Skip to content

Gunrunner444/Basic-Python-AutoClicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoClicker

A simple desktop autoclicker application built with Python and Tkinter. The app allows you to automate mouse clicking at specified intervals.

Features

  • GUI Interface: Clean and intuitive Tkinter-based user interface
  • Adjustable Click Interval: Set click speed from 1 to 10,000 milliseconds
  • Mouse Button Selection: Choose between left or right mouse clicks
  • Keyboard Hotkey: Press SPACE BAR to toggle clicking on/off
  • Start/Stop Buttons: Manual controls for clicking
  • Responsive UI: Uses threading to keep the interface responsive while clicking
  • MacOS Compatible: Works on macOS with proper permissions

Requirements

  • Python 3.7+
  • Tkinter (comes with Python)
  • pynput

Installation

1. Clone or Download the Repository

git clone <repository-url>
cd AutoClicker

2. Install Dependencies

pip install -r requirements.txt

3. Run the Application

python3 autoclicker.py

Usage

  1. Set Click Interval: Use the spinbox to set the interval between clicks (in milliseconds)
  2. Choose Mouse Button: Select either "Left Click" or "Right Click" using the radio buttons
  3. Start Clicking:
    • Click the "Start" button, OR
    • Press the SPACE BAR on your keyboard
  4. Stop Clicking:
    • Click the "Stop" button, OR
    • Press the SPACE BAR again to toggle off

Building a Standalone App (macOS)

To create a standalone app bundle for macOS:

python3 -m PyInstaller --windowed --name AutoClicker autoclicker.py --collect-all pynput

The built app will be in dist/AutoClicker.app. You can move it to your Applications folder:

cp -r dist/AutoClicker.app ~/Applications/

Code Structure

  • AutoClickerApp Class: Main application class that handles:
    • GUI setup and management
    • Click state management
    • Keyboard listener setup
    • Threading for the clicking loop
  • setup_gui(): Creates all GUI elements
  • start_keyboard_listener(): Initializes space bar detection
  • on_key_press(): Handles keyboard events
  • clicking_loop(): The main loop that performs clicks (runs in a separate thread)
  • update_status(): Updates UI to reflect current state

Permissions (macOS)

On macOS, you may need to grant accessibility permissions to run the autoclicker:

  1. Go to System PreferencesSecurity & PrivacyAccessibility
  2. Add the Terminal or Python application to the allowed list

Important Notes

⚠️ Use Responsibly: This tool can click very rapidly and might cause unintended actions. Always keep the application window visible and be prepared to close it if needed.

  • The autoclicker will continue clicking until you stop it
  • Some applications may require accessibility permissions to receive clicks
  • Never run the autoclicker on critical systems or during important tasks

Troubleshooting

Clicks not working:

  • Check that you've granted accessibility permissions on macOS
  • Ensure the target application is focused and can receive clicks

Space bar not toggling:

  • The keyboard listener requires proper permissions on macOS
  • Try granting Terminal or your IDE accessibility permissions

App won't start:

  • Verify all dependencies are installed: pip install -r requirements.txt
  • Ensure you're using Python 3.7 or higher

License

See LICENSE file for details.

About

A lightweight autoclicker that automates mouse clicks with customizable speed and intervals.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages