-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbloonTools.py
More file actions
41 lines (35 loc) · 769 Bytes
/
bloonTools.py
File metadata and controls
41 lines (35 loc) · 769 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
38
39
40
41
'''
automaitcally press 222222
'''
from time import sleep
from threading import Thread, Lock
import keyboard as kb
from holdKeyContext import HookRedirect
hr = None
rapid_2 = False
def rapid2():
while rapid_2:
kb.send('1')
sleep(.1)
kb.send('2')
sleep(.1)
print('rapid 2: stop')
def onKey(x):
global rapid_2
if x.event_type != 'down':
return
if x.name == '1':
rapid_2 = not rapid_2
if rapid_2:
print('rapid 2: start')
Thread(target = rapid2).start()
def main():
global hr
hr = HookRedirect(onKey)
print('Press 2 to rapid 2. ')
print('Enter to quit. ')
print('Good to go...')
with hr:
input()
if __name__ == '__main__':
main()