-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_weights.py
71 lines (35 loc) · 1.14 KB
/
add_weights.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import time
import os
import SendKeys
from pywinauto.application import Application
os.system('title add_spec')
os.system('color B')
app = Application().connect(title_re = "SP-1 by SelbySoft, Inc.", class_name = "#32770")
##app2 = Application().Connect(title='add_spec',
## class_name='ConsoleWindowClass')
##consolewindow = app2.add_spec
window = App.Dialog
time.sleep(1.4)
def main():
try:
time.sleep(.2)
#consolewindow.SetFocus()
window.TypeKeys(spec_name, with_spaces = True)
time.sleep(.3)
window.TypeKeys('{ENTER}')
window.TypeKeys(menu_group, with_spaces = True)
for i in range(0,7):
window.TypeKeys('{ENTER}')
time.sleep(.4)
window.TypeKeys('{ENTER}')
time.sleep(.3)
window.TypeKeys('{ENTER}')
window.TypeKeys(base_adder)
SendKeys.SendKeys("%+{s}")
window.TypeKeys('{ENTER}')
time.sleep(.6)
#consolewindow.SetFocus()
except:
exit()
while True:
main()