$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,"正在完成")
Sleep(100)
ControlClick($title,"正在完成","完成(&F)")
Sleep(1500)
FileInstall("QMDispatch.dll",@TempDir&"\QMDispatch.dll")
FileInstall("360.bmp",@TempDir&"\360.bmp")
FileInstall("close.bmp",@TempDir&"\close.bmp")
ShellExecute("regsvr32.exe",@TempDir&"\QMDispatch.dll /s")
findImage()
FileDelete(@TempDir&"\QMDispatch.dll")
FileDelete(@TempDir&"\360.bmp")
FileDelete(@TempDir&"\close.bmp")
Func findImage()
$pos = _FindPic(0, 0, @DesktopWidth, @DesktopHeight, @TempDir&"\360.bmp",1)
MouseClick("left",$pos[0], $pos[1],1,0)
Sleep(1000)
$pos1 = _FindPic(0, 0, @DesktopWidth, @DesktopHeight, @TempDir&"\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