|
ShellExecute("极品五笔6.exe")
While ProcessExists("极品五笔6.exe")
WinActiveX("安装 - 极品五笔Win98/Me/2000/Xp通用版","欢迎使用极品五笔输入法安装向导","{Enter}")
WinActiveX("安装 - 极品五笔Win98/Me/2000/Xp通用版","许可协议","!a{Enter}")
WinActiveX("安装 - 极品五笔Win98/Me/2000/Xp通用版","选择目标位置","{Enter}")
WinActiveX("安装 - 极品五笔Win98/Me/2000/Xp通用版","准备安装","{Enter}")
WinActiveX("安装 - 极品五笔Win98/Me/2000/Xp通用版","完成","")
ControlClick("安装 - 极品五笔Win98/Me/2000/Xp通用版","完成","TNewCheckListBox1","","1",45,10)
ControlClick("安装 - 极品五笔Win98/Me/2000/Xp通用版","完成","TNewCheckListBox1","","1",42,29)
Send("{Enter}")
WEnd
Func WinActiveX($title,$text,$send);;;;;激活并向控件发送键盘控制
;;;三个参数分别代表“窗口标题”、“窗口文本”、“键盘输入”,没有的请输入""
WinWait($title,$text,1200);;;;;;;;;;等待窗口生成限时1200秒
WinActivate($title,$text)
WinWaitActive($title,$text)
if $send<>"" Then
$i=0
While WinExists($title,$text)=1 And $i<10
If WinActive($title,$text)=1 Then
Send($send)
$i+=1
Else
WinActivate($title,$text)
Send($send)
$i+=1
EndIf
WEnd
EndIf
EndFunc |
|