-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMouseJiggler.py
More file actions
37 lines (25 loc) · 852 Bytes
/
MouseJiggler.py
File metadata and controls
37 lines (25 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
### Mouse Jiggler ###
# pip install pyautogui (first time only)
import pyautogui
import time
#VARIABLES
go=1
timeDelay = 2 #seconds
dragAmount = 100 #pixles
dragTime = .1 #seconds
orig_x , orig_y = pyautogui.position() #get the starting mouse poition
print("***START JIGGLE***")
print("Moving your mouse will exit the jiggler...")
while go>0:
curr_x , curr_y = pyautogui.position() #get current mouse position
if curr_x != orig_x:
#stops jiggler if mouse is manually moved on the screen
print("***END JIGGLE***")
break
pyautogui.moveRel(dragAmount, 0, duration = dragTime)
pyautogui.moveRel(-dragAmount, 0, duration = dragTime)
time.sleep(timeDelay)
#press ctl + alt + N to START
#press ctl + alt + M to FORCE STOP
#press ctl + alt + N to START
#press ctl + alt + M to STOP