The Auto Macro Counter is a Python script that automates typing incrementing numbers using your keyboard. This script is ideal for tasks requiring repetitive typing, such as testing input fields or automating certain workflows.
- Starts typing from a customizable starting number (default:
1525
). - Automatically types and sends incrementing numbers every 2 seconds.
- Allows the user to start and stop the macro with keyboard shortcuts.
- Python 3.6 or higher
pynput
library
-
Clone the repository:
git clone https://github.com/mtp-dev/auto-macro-counter.git cd auto-macro-counter
-
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # For fish shell, use `source venv/bin/activate.fish`
-
Install dependencies:
pip install pynput
-
Run the script:
python auto_macro.py
-
Use the following keyboard shortcuts:
- Press
s
to start the macro. - Press
q
to stop the macro.
- Press
- Starting Number: Change the
counter
variable in the script to set the starting number (default:1525
). - Time Interval: Modify the
time.sleep(2)
line to adjust the delay between each number.
When running, the script will:
- Type the number
1525
. - Press Enter.
- Increment to
1526
, then1527
, and so on, with a 2-second interval between each.
- The script requires
pynput
, which may not be pre-installed. Usepip install pynput
to install it. - Ensure you have the necessary permissions if running in restricted environments.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request.