-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFillerRobot.py
45 lines (38 loc) · 932 Bytes
/
FillerRobot.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import time
import keyboard
from pynput import keyboard as sd
from pynput.keyboard import Controller as con , Key as k
# The event listener will be running in this block
inputs = con()
def prin():
# tab 1
inputs.press(k.tab)
inputs.release(k.tab)
time.sleep(1.2)
# tab 2
inputs.press(k.tab)
inputs.release(k.tab)
time.sleep(1.2)
# space
inputs.press(k.space)
inputs.release(k.space)
time.sleep(1.2)
# tab 3
inputs.press(k.tab)
inputs.release(k.tab)
time.sleep(1.2)
# PSU ID writitng
inputs.type("218110246")
# tab 4
inputs.press(k.tab)
inputs.release(k.tab)
time.sleep(1.2)
# Student Name writing
inputs.type("Serry Sibaee")
with sd.Events() as events:
for event in events:
if event.key == sd.Key.esc:
prin()
break
else:
print('nothing wait for the form')