This program allows users to record their mouse clicks and play them back in an infinite loop. It captures the mouse click positions and the mouse button used (left or right) during recording, and accurately replays the sequence.
The code addresses the need for users who want to automate repetitive mouse clicking tasks, such as filling out forms, testing applications, or gaming actions without manual intervention.
Users can easily record their actions and automate mouse clicking without writing complex scripts or purchasing expensive automation software.
The program requires the following:
- Name: Python
- Description: The programming language used to run the script.
- Installation Instructions:
Download and install Python from the official website: https://python.org.
- Name: pynput
- Description: Enables programmatic control and monitoring of mouse and keyboard input.
- Installation Instructions:
Open the terminal or command prompt and run:pip install pynput
Note: If
pip
is not recognized, install it following these instructions.
Follow these simple steps to download and run the program:
- Click the green
<> Code
button on the GitHub repository page. - Select Download ZIP.
- Extract the downloaded ZIP file to a folder of your choice.
- Open your terminal (macOS/Linux) or Command Prompt (Windows).
- Navigate to the folder where you extracted the files using the
cd
command. Example:cd path\to\your\folder
- Run the program by typing:
python main.py
Replace
main.py
with the correct filename if it is different.
- Press
r
on your keyboard to start recording. - Perform the mouse clicks you want to record.
- Press
Esc
to stop recording.
- After recording, press
p
to start an infinite playback loop. - The mouse will move and click automatically following the recorded sequence.
- Press
Esc
to stop the playback loop.
- Press
q
at any time to fully exit the program.
Scenario:
A user needs to click multiple buttons in a web form repeatedly for testing purposes.
Example:
- Record clicks on each form field.
- Play the sequence back endlessly to test input fields automatically.
Scenario:
A gamer wants to automate resource collection in a click-heavy game.
Example:
- Record mouse clicks where resources appear.
- Enable infinite looping to continuously collect resources.
Scenario:
A tester needs to simulate user interaction to stress-test an application’s mouse input handling.
Example:
- Record the sequence of mouse clicks on key app areas.
- Replay the recorded actions infinitely to simulate user activity.
- The repository and its contents may be updated at any time without notice.
- Such updates may render parts of this README file obsolete.
- No commitment is made to maintain or update this README to reflect future changes.
- The provided code is delivered "as-is," without any guarantees regarding functionality, reliability, compatibility, or correctness.