#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: yangyatao@sf-express.com
Script Function:
sogou_pinyin_43b install AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
;确保只有一个程序在运行
$g_szVersion = "sogou_pinyin_43b install"
If WinExists($g_szVersion) Then
Exit
EndIf
AutoItWinSetTitle($g_szVersion)
; Fill in the username and password appropriate for your system.
Local $sUserName [2]
$sUserName[0] = "administrator"
$sUserName[1] = "admin"
Local $sPassword [4]
$sPassword[0] = "12345678"
$sPassword[1] = "87654321"
$sPassword[2] = "74125896"
$sPassword[3] = "14123456"
$soft = "sogou_pinyin_43b.exe"
$size = "15714488"
;校验文件大小
If FileGetSize($soft) <> $size Then
msgbox(64,"文件校验错误","大侠不吃这一套!",3)
Exit
EndIf
For $i In $sUserName
For $j In $sPassword
$pid = RunAs($i, @ComputerName, $j, 1, $soft)
If $pid <> 0 Then
;MsgBox(4096, "", "Key: " & @CRLF & "Value: " & $soft)
WinWaitActive("搜狗拼音输入法 4.3正式版 安装","欢迎使用“搜狗拼音输入法 4.3正式版”安装向导")
Send("!n")
WinWaitActive("搜狗拼音输入法 4.3正式版 安装","许可证协议")
Send("!i")
WinWaitActive("搜狗拼音输入法 4.3正式版 安装","选择安装位置")
ControlSetText("搜狗拼音输入法 4.3正式版 安装","选择安装位置", "", "D:\Program Files\SogouInput" )
Send("!n")
WinWaitActive("搜狗拼音输入法 4.3正式版 安装","选择“开始菜单”文件夹")
Send("!i")
WinWaitActive("搜狗拼音输入法 4.3正式版 安装","搜狗拼音输入法已经安装")
Send("!f")
;第二次安装,则未必可以弹得出来
WinWaitActive("搜狗拼音输入法 个性化设置向导","下一步")
Send("!n")
WinWaitActive("搜狗拼音输入法 个性化设置向导","模糊音设置")
Send("!n")
WinWaitActive("搜狗拼音输入法 个性化设置向导","下一步")
Send("!n")
WinWaitActive("搜狗拼音输入法 个性化设置向导","全选")
;未实现
;ControlClick("搜狗拼音输入法 个性化设置向导","全选", "", , , 11, 77 )
Send("!n")
WinWaitActive("搜狗拼音输入法 个性化设置向导","设为默认")
Send("!n")
WinWaitActive("搜狗拼音输入法 个性化设置向导","立即登录通行证")
Send("!n")
WinWaitActive("搜狗拼音输入法 个性化设置向导","完成")
Send("!f")
EndIf
Next
Next
|