Auto Mouse and Keyboard Input is a Windows tool for automating mouse clicks and keyboard inputs through an intuitive Tkinter GUI. It offers three automation modes (mouse and keyboard, mouse only, keyboard only), selectable click types (left, right, or both), and fixed or cursor-based mouse clicks. Users can input up to five alphabet keys, set custom intervals, record mouse positions with F5, and toggle automation with F6. Packaged as a standalone .exe, it’s ideal for repetitive tasks like form filling or gaming macros.
- Operating System: Windows 7 or later.
- Python: Version 3.13.3 (Microsoft Store or python.org).
- Dependencies:
pyautogui,keyboard,pyinstaller(via pip). - Storage: ~20 MB for .exe and source.
Steps to create the .exe from source.
-
Install Python 3.13.3:
- Download from python.org (recommended) or use Microsoft Store version.
- Check “Add Python to PATH” during installation.
- Verify:
Expected:
python --versionPython 3.13.3.
-
Install Dependencies:
- In PowerShell or Command Prompt:
python -m pip install pyautogui keyboard pyinstaller - Verify PyInstaller:
Expected:
python -m PyInstaller --version6.13.0or higher.
- In PowerShell or Command Prompt:
-
Set Up Project Folder:
- Create
C:\AutoInputProgram. - Save
auto_input_program.py(provided separately) in this folder.
- Create
-
Create the .exe:
- Navigate:
cd C:\AutoInputProgram - Run:
python -m PyInstaller --onefile --windowed auto_input_program.py- If PyInstaller fails, use:
Replace
C:\Users\<YourUser>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\Scripts\pyinstaller.exe --onefile --windowed auto_input_program.py<YourUser>with your username. - Output:
C:\AutoInputProgram\dist\auto_input_program.exe.
- If PyInstaller fails, use:
- Navigate:
-
Set Up .exe Folder:
- Create
C:\AutoInputApp. - Copy
auto_input_program.exefromC:\AutoInputProgram\disttoC:\AutoInputApp. - Optionally delete
C:\AutoInputProgram\build,C:\AutoInputProgram\dist,auto_input_program.spec.
- Create
-
Run:
- Double-click
auto_input_program.exeinC:\AutoInputApp. - GUI opens at 400x500 pixels (adjustable in source).
- Double-click
-
Configure:
- Automation Mode: Choose “mouse_and_keyboard,” “mouse,” or “keyboard” from dropdown.
- Click Type: Select “left,” “right,” or “both” for mouse-enabled modes.
- Mouse Click Mode: Pick “Fixed Position” (uses X, Y) or “Follow Cursor.”
- Fixed X, Y: Enter manually or use F5 to record mouse position.
- Keyboard Inputs: Add 0–5 alphabet letters (e.g., a, b) for keyboard-enabled modes.
- Interval: Set delay in seconds (e.g., 1).
-
Run Automation:
- Press F6 or click “Start/Stop (F6)” to start/stop.
- Failsafe: Move mouse to screen corner to stop.
-
Record Position:
- Move mouse, press F5 or click “Record Position (F5)” to set X, Y.
- Window Size: Edit
self.root.geometry("400x500")inauto_input_program.py(e.g.,400x550), then recompile. - Features: Modify script and recompile.
- PyInstaller Not Recognized:
- Use
python -m PyInstalleror add to PATH:- Environment Variables >
Path> Add:C:\Users\<YourUser>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\Scripts.
- Environment Variables >
- Reinstall:
python -m pip install --upgrade pyinstaller
- Use
- .exe Fails:
- Install Microsoft Visual C++ Redistributable (microsoft.com).
- Exclude
auto_input_program.exefrom antivirus.
- GUI Issues:
- Increase height (e.g.,
400x650) if elements are cut off.
- Increase height (e.g.,
- Hotkeys:
- Check F5/F6 conflicts.
- Microsoft Store Python:
- Switch to python.org’s Python 3.13.3 if needed:
- Uninstall Store version, install from python.org, reinstall dependencies.
- Switch to python.org’s Python 3.13.3 if needed:
Unlicensed, provided as-is for personal use.
For issues, check script comments or seek Python/Tkinter/PyInstaller community support.