回复 1# xlj310
Run(@ScriptDir&"\阿里旺旺(卖家专用版)_2012.exe")
If WinExists("阿里旺旺2012卖家版 安装","") Then
Local $hwnd = WinGetHandle("阿里旺旺2012卖家版 安装","") ;使用句柄可以后台操作
ControlClick($hwnd,"","[CLASS:Button;Instance:2]") ;点下一步
Sleep(1000)
ControlClick($hwnd,"","[CLASS:Button;Instance:2]") ;点下一步
Sleep(1000)
ControlClick($hwnd,"","[CLASS:Button;Instance:2]") ;点下一步
Sleep(1000)
ControlSetText($hwnd,"","[CLASS:Edit;Instance:1]","e:\Program Files\AliWangWang") ;修改安装路径
Sleep(1000)
ControlClick($hwnd,"","[CLASS:Button;Instance:2]") ;点下一步
Sleep(1000)
ControlClick($hwnd,"","[CLASS:Button;Instance:2]") ;点下一步
Sleep(1000)
WinActivate($hwnd,"")
Sleep(1000)
Local $pos = WinGetPos($hwnd,"")
MouseClick("left",$pos[0]+27,$pos[1]+330) ;点'确保网购安全,体验淘宝浏览器'选项
;本想用以下这一句代码,但是不知道为什么不成功,哎!只能使用上面的模拟鼠标点击了
;$status = ControlCommand($hwnd,"","[CLASS:Static;Instance:2]","UnCheck","") ;点'确保网购安全,体验淘宝浏览器'选项
Sleep(1000)
ControlClick($hwnd,"","[CLASS:Button;Instance:2]") ;点安装
Else
MsgBox(0,"错误","阿里旺旺2012卖家版 安装程序没有运行,程序将退出")
EndIf
|