111111
This commit is contained in:
1 parent
549c2b8f55
commit
b7843917ff
11 files changed
+362
-25
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import uiautomation as auto
|
||||
from utils.config import cfg
|
||||
|
||||
|
||||
softName = "赛纳3D打印控制系统 V1.4.3.2"
|
||||
softName = cfg('exe.soft_name', None)
|
||||
|
||||
# 遍历所有控件 找到
|
||||
def findAndClick(control, depth=0,index=1):
|
||||
@@ -71,12 +71,18 @@ def findAndClick(control, depth=0,index=1):
|
||||
|
||||
# 点击导入文件按钮
|
||||
def clickFileIMportShow():
|
||||
if softName is None:
|
||||
print(f"错误:软件名称未配置")
|
||||
exit(1)
|
||||
control = auto.WindowControl(searchDepth=1, Name=softName)
|
||||
clickRes = findAndClick(control,index=1)
|
||||
return clickRes
|
||||
|
||||
# 点击开始切片按钮
|
||||
def clickBegingSlice():
|
||||
if softName is None:
|
||||
print(f"错误:软件名称未配置")
|
||||
exit(1)
|
||||
control = auto.WindowControl(searchDepth=1, Name=softName)
|
||||
clickRes = findAndClick(control,index=2)
|
||||
return clickRes
|
||||
@@ -3,9 +3,21 @@ import os
|
||||
import subprocess
|
||||
import time
|
||||
import uiautomation as auto
|
||||
exe_path = r"C:\Users\Administrator\Desktop\排版软件\NormalTek.ThreeDPrinter.UI.exe"
|
||||
from utils.config import cfg
|
||||
# exe_path = cfg('exe.small_exe', None)
|
||||
# if exe_path is None:
|
||||
# print(f"错误:exe_path 未配置")
|
||||
# exit(1)
|
||||
|
||||
def start_exe():
|
||||
def start_exe(data):
|
||||
exe_path = None
|
||||
if "small" in data:
|
||||
exe_path = cfg('exe.small_exe', None)
|
||||
elif "big" in data:
|
||||
exe_path = cfg('exe.big_exe', None)
|
||||
else:
|
||||
print(f"错误:机型类型未配置")
|
||||
exit(1)
|
||||
try:
|
||||
# 检查文件是否存在
|
||||
if not os.path.exists(exe_path):
|
||||
|
||||
Reference in new issue
Block a user