|
发表于 2011-8-23 21:29:39
|
显示全部楼层
回复 220# feiye7366
发个极点五笔的源码:
;说明:本脚本由 《星驰周的软件安装脚本辅助工具5.5.0.0》于2011年08月23日所生成,请尊重作者劳动,保留版权信息
HotKeySet("{F11}", "tuichu");退出
Opt("MouseCoordMode", 0);相对激活窗口的坐标
Opt("WinTitleMatchMode", 2);标题的任意子串皆可匹配
Dim $rjlj = IniRead("soft.ini","设置","程序路径",@WorkingDir)
Dim $ruanj = $rjlj & "\setup713n.exe"
Dim $zcmc="极点五笔 7.13版",$reg="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
Dim $bt = "极点五笔 7.13版 安装"
Dim $txt1 = "许可协议"
Dim $txt2 = "目标文件夹"
Dim $bt3 = "提示"
Dim $txt3 = "确定"
If Not FileExists($ruanj) Then
TrayTip("错误!!","该文件找不到:" & @CRLF & $ruanj & @CRLF & @CRLF & "3 秒后自动退出", 20)
Sleep(2500)
Exit
EndIf
For $i = 1 To 1000
$var = RegEnumKey($reg, $i)
If @error <> 0 Then ExitLoop
If $zcmc = RegRead($reg & "\" & $var, "DisplayName") Then
If MsgBox(1, "安装已重复", "发现系统中已经安装过:" & $zcmc & @CRLF & @CRLF & "确定 =继续安装,取消 =退出安装")=2 Then $i=2000
EndIf
Next
If $i>1000 Then Exit
$star = TimerInit()
Run($ruanj);运行软件
TrayTip("温馨提示","自动安装期间为避免操作失败,请勿动键盘鼠标" & @CRLF & @CRLF & "长时间无反应可按 F11 退出", 20)
Sleep(1000)
WinWaitActive($bt, $txt1)
ControlClick($bt, $txt1, "Button2")
WinWaitActive($bt, $txt2)
$var=ControlGetFocus($bt , $txt2)
ControlSetText($bt, $txt2, $var ,"d:\Program Files\freeime")
ControlClick($bt, $txt2, "Button2")
WinWaitActive($bt3, $txt3)
ControlClick($bt3, $txt3, "Button1")
ControlClick($bt3, $txt3, "Button1")
TrayTip($ruanj&"安装完成!","共计耗时:" & Int(TimerDiff($star) / 1000) & "秒.谢谢使用!", 20)
Sleep(2000)
;强行退出函数
Func tuichu()
Exit
EndFunc |
|