This is a proof of concept for achieving macro recording and accurate playback using Python. This is the first iteration of these scripts, designed for automating repetitive tasks through recorded input sequences.
- Run the recording.py file in your IDE.
- Press F5 (or the start script button in your IDE) to initiate recording.
- Press the Esc key to stop the recording.
- The macro will be saved as a macro_x.json file in the /recordings directory.
- Open the playback.py file in your IDE.
- Press F5 (or the start script button in your IDE) to initiate playback.
- Playback will automatically end when the script completes. (Note: Currently, there is no key to stop playback early; this is a work in progress.)
- Python
- PyAutoGUI & Pynput: For simulating keyboard and mouse events.
- JSON: For storing recorded macros.
- Record keystrokes
- Record mouse button clicks
- Record mouse movements
- Playback all recorded keystrokes, mouse clicks, and movements
- Optimize Playback Accuracy: Improve the precision of macro playback to better simulate human-like behavior.
- Optimize Recording Efficiency: Reduce the overhead and improve the performance of the recording process.
- Implement Early Exit: Add a hotkey or method to stop playback before it completes.
- Create GUI with Tkinter or PyQT6
Feel free to provide feedback-positive or negative! This is an open source project, please feel free to make any contributions! You can reach out to me for any questions or suggestions at: jarod.a.github@gmail.com
Thanks, Jarod