diff --git a/Auto-Clicker/README.md b/Auto-Clicker/README.md new file mode 100644 index 0000000..596d9e0 --- /dev/null +++ b/Auto-Clicker/README.md @@ -0,0 +1,59 @@ +# Auto Clicker + +A Python automation tool that allows you to automatically click the mouse at rapid intervals. This is useful for repetitive clicking tasks and can be controlled via keyboard hotkeys. + +## Features + +- Start and stop automatic clicking with keyboard hotkeys +- Adjustable click interval (currently set to 1ms between clicks) +- Simple keyboard controls for easy on/off toggling +- Minimal resource usage + +## Requirements + +- Python 3.x +- pyautogui library +- keyboard library + +## Installation + +Install the required dependencies using pip: + +```bash +pip install -r requirements.txt +``` + +## How to Use + +1. Run the script by executing the `auto_clicker.py` file: + +```bash +python auto_clicker.py +``` + +2. The program will start and display instructions: + - Press `'S'` to **start** the auto clicker + - Press `'E'` to **stop** the auto clicker + - Press `'Q'` to **quit** the program + +3. Once started (by pressing 'S'), the auto clicker will automatically perform mouse clicks at the current cursor position at fixed intervals (Can be edited in the code). + +4. Press 'E' to stop the clicking, and press 'Q' to exit the program entirely. + +## Caution + +⚠️ **WARNING**: Use this tool responsibly. Automated clicking can: +- Interfere with other applications +- Cause unintended actions if not carefully controlled +- May violate terms of service for certain applications or games + +Always ensure you have full control over what the auto clicker is doing before starting it. + +## How It Works + +The script uses the following libraries: + +- **pyautogui**: For performing automated mouse clicks +- **keyboard**: For detecting keyboard hotkey presses to control the clicker + +The program runs in an infinite loop, continuously checking if the 'q' key is pressed (to exit) and performing clicks when the `clicking` flag is set to `True`. diff --git a/Auto-Clicker/auto_clicker.py b/Auto-Clicker/auto_clicker.py new file mode 100644 index 0000000..c0c9d23 --- /dev/null +++ b/Auto-Clicker/auto_clicker.py @@ -0,0 +1,34 @@ +import pyautogui +import keyboard +import time + +clicking = False + + +def start_clicking(): + global clicking + clicking = True + print("Auto clicker started") + + +def stop_clicking(): + global clicking + clicking = False + print("Auto clicker stopped") + + +keyboard.add_hotkey("s", start_clicking) +keyboard.add_hotkey("e", stop_clicking) + +print("Press 'S' to start clicking") +print("Press 'E' to stop clicking") +print("Press 'Q' to quit") + +while True: + if clicking: + pyautogui.click() + time.sleep(0.001) + + if keyboard.is_pressed("q"): + print("Exiting program") + break diff --git a/Auto-Clicker/requirements.txt b/Auto-Clicker/requirements.txt new file mode 100644 index 0000000..215233d --- /dev/null +++ b/Auto-Clicker/requirements.txt @@ -0,0 +1,2 @@ +pyautogui +keyboard