我尝试了以下四种使用python启动应用程序的方法,但都失败了。请告诉我哪里出错了。
例如,我的应用程序的名称是myapp™.exe并安装在
路径"C:\Program Files (x86)\myapp™.exe"
。
from pywinauto.application import Application
app = Application(backend="uia").start('myapp™.exe')
dlg_spec = app.myapp™
actionable_dlg = dlg_spec.wait('visible')
from subprocess import Popen
from pywinauto import Desktop
Popen('myapp™', shell=True)
dlg = Desktop(backend="uia").Calculator
dlg.wait('visible')
import os
os.system("open /Applications/myapp™.app")
from subprocess import Popen
Popen(['myapp™'])