This is a Mouse Jiggler script written in Python that automates mouse movement between two specified positions to prevent system inactivity. It allows for dynamic control of movement speed and toggling of the jiggle functionality through keyboard inputs.
- Automated Mouse Movement: Moves the mouse between two specified positions to simulate activity.
- Adjustable Speed: Change the movement speed using keyboard arrow keys.
- Start/Pause Control: Toggle the jiggle on or off using keyboard shortcuts.
- Exit Control: Quit the application using a keyboard shortcut.
To use this Mouse Jiggler script, follow the steps below:
-
Clone the repository:
git clone https://github.com/your-username/mouse-jiggler.git cd mouse-jiggler
-
Install the required libraries:
pip install pyautogui pynput
-
Run the script:
python mouse_jiggler.py
-
Run the script:
python mouse_jiggler.py
-
Setup Positions:
- Hover over the first position where you want the mouse to move and press Enter.
- Hover over the second position and press Enter again.
-
Keyboard Controls:
- Press
s
to start or pause the mouse jiggler. - Press the
up
arrow key to increase the movement speed. - Press the
down
arrow key to decrease the movement speed. - Press
q
to quit the script.
- Press
-
Main Functions:
move_mouse(pos1, pos2)
: Moves the mouse between two positions based on the globalactive
flag.adjust_speed(key)
: Adjusts the movement speed based on arrow key input.on_press(key)
: Handles keyboard inputs for controlling the jiggle functionality and quitting the script.
-
Program Flow:
- The user is prompted to set up two mouse positions.
- A separate thread continuously moves the mouse between the two positions.
- A keyboard listener handles user inputs to control the jiggler and adjust the speed.
- Administrative privileges are not required, but ensure your system allows for automated mouse movements.
- Use responsibly to avoid unintended interference with other applications.
Use this script responsibly. The author is not liable for any misuse or damage caused by running this software.
Copyright (C) 2024 Talha Akhlaq talhaakhlaq1@gmail.com
Distributed under the MIT License. See LICENSE
for details.
For more information on my projects and other academic work, please visit my GitHub profile.