$title= " 360 杀毒"
WinWait($title,"欢迎使用")
Sleep(100)
ControlClick($title,"欢迎使用","下一步(&N) >")
WinWait($title,"许可证协议")
Sleep(100)
ControlClick($title,"许可证协议","我接受(&I)")
WinWait($title,"选择安装位置")
Sleep(100)
;ControlSetText ($title,"请选择安装位置","Edit1","d:\Program Files\360\360safe")
ControlClick($title,"选择安装位置","下一步(&N) >")
WinWait($title,"选择“开始菜单”文件夹")
Sleep(100)
ControlClick($title,"选择“开始菜单”文件夹","安装(&I)")
;WinWait($title,"360安全浏览器安装设置")
;Sleep(100)
;ControlClick($title,"360安全浏览器安装设置","安装360安全浏览器3.0正式版本 (2.6M)")
;ControlClick($title,"360安全浏览器安装设置","下一步(&N) >")
WinWait($title,"正在完成")
Sleep(100)
;~ ControlClick($title,"正在完成","运行 360杀毒(&R)")
;~ Sleep(100)
ControlClick($title,"正在完成","完成(&F)")
Sleep(1500)
ShellExecuteWait("QMDispatch.exe");将QMDispatch.exe与脚本放在同一个目录
ShellExecute("regsvr32.exe",@SystemDir&"\QMDispatch.dll /s")
findImage()
FileDelete(@SystemDir&"\360.bmp")
FileDelete(@SystemDir&"\close.bmp")
Func findImage()
$pos = _FindPic(0, 0, @DesktopWidth, @DesktopHeight, @SystemDir&"\360.bmp",1)
MouseClick("left",$pos[0], $pos[1],1,0)
Sleep(1000)
$pos1 = _FindPic(0, 0, @DesktopWidth, @DesktopHeight, @SystemDir&"\close.bmp",1)
MouseClick("left",$pos1[0], $pos1[1],1,0)
EndFunc ;==>findImage
Func _FindPic($iLeft, $iTop, $iRight, $iBottom, $szFileName, $fSimilar)
Dim $pos[2]
$obj = ObjCreate("QMDispatch.QMFunction")
$foundpixel = $obj.FindPic($iLeft, $iTop, $iRight, $iBottom, $szFileName, $fSimilar)
$pos[0] = Int($foundpixel / 8192)
$pos[1] = Mod($foundpixel, 8192)
Return $pos
EndFunc ;==>FindPic