如果您只想运行AutoIt脚本,请使用os.system
或os.popen
并查看“ 运行脚本 ”页面。 如果要从Python脚本调用AutoIt方法,则:
- 在您的系统中注册AutoItX3.dll:
regsvr32 AutoItX3.dll
- 安装PyWin32
在代码中使用AutoIt,如下所示:
import win32com.client autoit = win32com.client.Dispatch("AutoItX3.Control") autoit.AnyAutoitMethod()