-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_ing.py
85 lines (45 loc) · 1.55 KB
/
add_ing.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
##window.Wait('ready')
##window.SetFocus()
##window.Click()
##window.TypeKeys('9999')
##window.TypeKeys('{ENTER}')
##window.TypeKeys('m')
##window.TypeKeys('s')
time.sleep(1.4)
def main():
try:
window.TypeKeys('a')
time.sleep(.2)
consolewindow.SetFocus()
ing_name = raw_input("spec name: ")
ing_name = ing_name[:20]
window.TypeKeys(ing_name, with_spaces = True)
window.TypeKeys('{ENTER}')
menu_group = "BAR" #change menu group to what is needed
window.TypeKeys(menu_group, with_spaces = True)
for i in range(0,11):
window.TypeKeys('{ENTER}')
window.TypeKeys('sparkling wine', with_spaces = True ) ##group size
window.TypeKeys('{ENTER}')
window.TypeKeys('{ENTER}')
window.TypeKeys('$')
consolewindow.SetFocus()
window.TypeKeys(raw_input("enter $ amount: "))
SendKeys.SendKeys("%+{s}")
window.TypeKeys('{ENTER}')
time.sleep(.6)
consolewindow.SetFocus()
except:
exit()
while True:
main()