import pywinautoclass 类_程序 def __init__self 程序位置 主窗口名 self程序位置 = 程序位置 self主窗口名 = 主窗口名 def __str__self # 返回该类实例对象的字符串表示形式 return f打开:self程序位置; 得到:self主窗口名窗口#作家A 英国 def 获
可以这样调用:
app = pywinauto.Application(backend="uia").connect(title=self.主窗口名) dlg = app[self.主窗口名] dlg.maximize() dlg.close()
原文地址: https://www.cveoy.top/t/topic/cveK 著作权归作者所有。请勿转载和采集!