新建-function 写入函数 rem 关闭出现错误窗口Function checkExist() If Window("出现错误").WinObject("确定").Exist(3) Then Window("出现错误").WinObject("确定").Click End IfEnd Function 保存文件 引用:添加函数文件到resources 在脚本中使用Call 方法 使用函数:Call checkExist(…
C# 向程序新建的窗体中添加控件,控件需要先实例化,然后用controls.add添加到新的窗体中去 Form settingForm = new Form(); setForm deviceSet = new setForm(); settingForm.Controls.Add(deviceSet); settingForm.Show();…