-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathafk.py
27 lines (26 loc) · 843 Bytes
/
afk.py
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
import ctypes, time, datetime, random
mouse_event = ctypes.windll.user32.mouse_event
MOUSEEVENTF_MOVE = 0x0001
# MOUSEEVENTF_LEFTDOWN = 0x0002
# MOUSEEVENTF_LEFTUP = 0x0004
print("press ctrl-c to end mouse shaker")
print("BE RIGHT BACK...")
try:
while True:
mouse_event(MOUSEEVENTF_MOVE,25,0,0,0)
time.sleep(1)
mouse_event(MOUSEEVENTF_MOVE,0,25,0,0)
time.sleep(1)
mouse_event(MOUSEEVENTF_MOVE,-25,0,0,0)
time.sleep(1)
mouse_event(MOUSEEVENTF_MOVE,0,-25,0,0)
time.sleep(1)
# wait randomly
# delay = random.randint(0,5)
# time.sleep(delay)
# mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0)
# time.sleep(2)
# mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0)
# time.sleep(2)
except KeyboardInterrupt:
pass