McAfee8.5i自动安装
ToolTip("正在全自动安装McAfee8.5i... ", @DesktopWidth - 140, @DesktopHeight - 40, "", 0, 2)Run ( "Setup.exe" ) ;运行外部程序
Dim $windows1,$windows2
Do
$windows1=WinActive ( "McAfee" , "下一步" )
Sleep(3000)
Until $windows1=1
;循环等待下一步窗口打开
WinActive ( "McAfee" , "下一步" );检查指定的窗口是否存在且当前被激活
ControlClick ( "McAfee", "下一步", 1301 , "left");向指定控件发送鼠标点击命令
WinActive ( "McAfee" , "McAfee" );检查指定的窗口是否存在且当前被激活
ControlClick ( "McAfee", "McAfee", 1002 , "left");向指定控件发送鼠标点击命令
Send ( "{DOWN 2}" );向下箭头两下选定“永久”
Sleep(500)
Send ( "{TAB}" );选定下一控件
Sleep(500)
Send ( "{DOWN 3}" );向下箭头两下选定“中国”
Sleep(500)
ControlClick ( "McAfee", "McAfee", 1040 , "left");向指定控件发送鼠标点击命令
Sleep(500)
ControlClick ( "McAfee", "McAfee", 1 , "left");点击确定
WinActive ( "McAfee" , "典型" );检查指定的窗口是否存在且当前被激活
ControlClick ( "McAfee", "典型", 1301 , "left");向指定控件发送鼠标点击命令
Sleep(500)
WinActive ( "McAfee" , "标准保护" );检查指定的窗口是否存在且当前被激活
ControlClick ( "McAfee", "标准保护", 1301 , "left");向指定控件发送鼠标点击命令
Sleep(500)
WinActive ( "McAfee" , "安装" );检查指定的窗口是否存在且当前被激活
ControlClick ( "McAfee", "安装", 1461 , "left");向指定控件发送鼠标点击命令
Do
$windows2=WinActive ( "McAfee" , "立即更新" )
Sleep(3000)
Until $windows2=1
;循环等待立即更新窗口打开
WinActive ( "McAfee" , "立即更新" );检查指定的窗口是否存在且当前被激活
ControlClick ( "McAfee" , "立即更新", 1338 , "left" );向指定控件发送鼠标点击命令
ControlClick ( "McAfee" , "立即更新", 822 , "left" );向指定控件发送鼠标点击命令
ControlClick ( "McAfee" , "立即更新", 1337 , "left" );向指定控件发送鼠标点击命令
ToolTip("安装McAfee8.5i完毕... ", @DesktopWidth - 140, @DesktopHeight - 40, "", 0, 2)
Sleep(3000)
ToolTip("") 学习自动化 自己做的自动安装工具用不成,看来真的要好好学习的。 谢谢,收藏 谢谢,收藏 雷锋精神传天下!谢谢分享!
页:
[1]