$title="安装 - 万象网管客户端"
FileInstall("220.exe",@TempDir&"/220.exe")
;$cmdline[1] 为安装协议
;$cmdlne[2] 为服务端IP
if $cmdline[1]="/ipx" Then
Run(@TempDir&"/220.exe")
WinWaitActive($title,"推荐您在继续安装前关闭所有其它应用程序")
ControlClick($title,"推荐您在继续安装前关闭所有其它应用程序","TNewButton1")
WinWaitActive($title,"许可协议")
ControlClick($title,"许可协议","TNewRadioButton1")
ControlClick($title,"许可协议","TNewButton2")
WinWaitActive($title,"选择安装产品类型")
ControlClick($title,"选择安装产品类型","TNewButton2")
WinWaitActive($title,"选择协议类型")
Send("{UP}")
WinActivate("安装","您目前使用的是广播协议(IPX)")
ControlClick("安装","您目前使用的是广播协议(IPX)","Button2")
WinWaitActive($title,"选择协议类型")
ControlClick($title,"选择协议类型","TNewButton2")
WinWaitActive($title,"准备安装")
ControlClick($title,"准备安装","TNewButton2")
WinWaitActive($title,"万象网管客户端 安装向导完成")
ControlClick($title,"万象网管客户端 安装向导完成","TNewButton2")
Exit
ElseIf $cmdline[1]="/udp" And $cmdline[0]="2" Then
Run(@TempDir&"/220.exe")
WinWaitActive($title,"推荐您在继续安装前关闭所有其它应用程序")
ControlClick($title,"推荐您在继续安装前关闭所有其它应用程序","TNewButton1")
WinWaitActive($title,"许可协议")
ControlClick($title,"许可协议","TNewRadioButton1")
ControlClick($title,"许可协议","TNewButton2")
WinWaitActive($title,"选择安装产品类型")
ControlClick($title,"选择安装产品类型","TNewButton2")
WinWaitActive($title,"选择协议类型")
Send("{DOWN}")
WinActivate("安装","您目前使用的是广播协议(UDP)")
ControlClick("安装","您目前使用的是广播协议(UDP)","Button2")
WinWaitActive($title,"选择协议类型")
ControlSetText($title,"选择协议类型","TEdit1",$cmdline[2])
ControlClick($title,"选择协议类型","TNewButton2")
WinWaitActive($title,"准备安装")
ControlClick($title,"准备安装","TNewButton2")
WinWaitActive($title,"万象网管客户端 安装向导完成")
ControlClick($title,"万象网管客户端 安装向导完成","TNewButton2")
Exit
ElseIF $cmdline[1]="/tcp" And $cmdline[0]="2" Then
Run(@TempDir&"/220.exe")
WinWaitActive($title,"推荐您在继续安装前关闭所有其它应用程序")
ControlClick($title,"推荐您在继续安装前关闭所有其它应用程序","TNewButton1")
WinWaitActive($title,"许可协议")
ControlClick($title,"许可协议","TNewRadioButton1")
ControlClick($title,"许可协议","TNewButton2")
WinWaitActive($title,"选择安装产品类型")
ControlClick($title,"选择安装产品类型","TNewButton2")
WinWaitActive($title,"选择协议类型")
; Send("{DOWN}")
; WinActivate("安装","您目前使用的是广播协议(UDP)")
; ControlClick("安装","您目前使用的是广播协议(UDP)","Button2")
WinWaitActive($title,"选择协议类型")
ControlSetText($title,"选择协议类型","TEdit1",$cmdline[2])
ControlClick($title,"选择协议类型","TNewButton2")
WinWaitActive($title,"准备安装")
ControlClick($title,"准备安装","TNewButton2")
WinWaitActive($title,"万象网管客户端 安装向导完成")
ControlClick($title,"万象网管客户端 安装向导完成","TNewButton2")
Exit
else
MsgBox(0,"提示","参数不正确。请重新设置!")
EndIf