-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathking.py
More file actions
33 lines (27 loc) · 703 Bytes
/
Copy pathking.py
File metadata and controls
33 lines (27 loc) · 703 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
from window_input import Window, Key
import time
from tlopo_util import *
def swing_jump(tlopo):
ti = time.time()
tlopo.key_down(Key.VK_CONTROL)
tlopo.key_down(Key.VK_SPACE)
time.sleep(.1)
tlopo.key_up(Key.VK_CONTROL)
while not ti + 1 < time.time():
tlopo.key_up(Key.VK_SPACE)
time.sleep(.1)
tlopo.key_down(Key.VK_SPACE)
else:
tlopo.key_up(Key.VK_SPACE)
def test_swing():
while True:
tlopo.key_down(Key.VK_CONTROL)
time.sleep(.1)
tlopo.key_up(Key.VK_CONTROL)
time.sleep(.1)
if __name__ == "__main__":
time.sleep(2)
tlopo = Window()
test_swing()
#while True:
#swing_jump(tlopo)