新建-function
写入函数
rem 关闭出现错误窗口Function checkExist() If Window("出现错误").WinObject("确定").Exist(3) Then Window("出现错误").WinObject("确定").Click End IfEnd Function
保存文件
引用:添加函数文件到resources
在脚本中使用Call 方法 使用函数:Call checkExist()