找回密码
 加入
搜索
查看: 3783|回复: 4

[原创] 福昕阅读器(FoxitReader)_3.1.4.1211自动安装脚本

[复制链接]
发表于 2010-3-9 10:07:16 | 显示全部楼层 |阅读模式
本帖最后由 jttcw 于 2010-3-9 10:11 编辑

Run("福昕阅读器(FoxitReader)_3.1.4.1211.exe")
$T="福昕阅读器安装向导"
WinWait($T,"新特性列表")
ControlClick($T,"新特性列表","Button1")
WinWait($T,"许可协议")
ControlClick($T,"许可协议","Button1")
WinWait($T,"选择您所需要的组件进行安装")
ControlClick($T,"选择您所需要的组件进行安装","Button2")
WinWait($T,"请选择安装路径")
ControlClick($T,"请选择安装路径","Button1");采用默认路径安装
WinWait($T,"添加桌面快捷方式")
ControlClick($T,"添加桌面快捷方式","Button3");取消”添加桌面快捷方式“
ControlClick($T,"添加桌面快捷方式","Button4");取消”添加到开始菜单项“
ControlClick($T,"添加桌面快捷方式","Button7");取消”添加到快速启动栏“
ControlClick($T,"添加桌面快捷方式","Button1")
WinWait($T,"点击“安装”按钮继续安装")
ControlClick($T,"点击“安装”按钮继续安装","Button1")
WinWait($T,"福昕阅读器安装成功")
ControlClick($T,"福昕阅读器安装成功","Button2");取消“运行福昕阅读器”
ControlClick($T,"福昕阅读器安装成功","Button1")
WinWait("http://www.joyinker.com/","",5);联网状态会打开网页,如无网络链接则不会打开网页,后种情况则5秒钟后退出
WinClose("http://www.joyinker.com/")
;有网友将网址换成“IEXPLORE.EXE”,但本人实际测试发现,在先安装了360安全浏览器后,会启动360浏览器加载网址,因此直接写网址
;本人也是新手,哪位朋友如有更好的脚本编写方式,还请不吝赐教。特别是如何解决自动弹出网页的问题希望有更多的思路提出,供大家研究
 楼主| 发表于 2010-3-9 16:07:18 | 显示全部楼层
经测试,上面的脚本存在一定的问题:
1.如果已经在“标签模式”下事先打开一个网页,则安装结束后无法关闭网页;
2.如果不是首次安装,会出现已经安装的提示,安装将暂停;
因此,以上程序只适用于首次安装。下面是经过修改的脚本,请方家指正:

Run("福昕阅读器(FoxitReader)_3.1.4.1211.exe")
TrayTip( "正在安装","福昕阅读器(FoxitReader)_3.1.4.1211,请稍后......",1)
$T="福昕阅读器安装向导"
WinWaitActive($T,"你已经安装了福昕阅读器. 是否要继续安装?",3)
Send("!y")
WinWaitActive($T,"支持MSAA")
ControlClick($T,"支持MSAA","Button1")
WinWaitActive($T,"许可协议")
ControlClick($T,"许可协议","Button1")
WinWait($T,"选择您所需要的组件进行安装")
ControlClick($T,"选择您所需要的组件进行安装","Button2")
WinWait($T,"请选择安装路径")
ControlClick($T,"请选择安装路径","Button1");采用默认路径安装
WinWait($T,"添加桌面快捷方式")
ControlClick($T,"添加桌面快捷方式","Button3");取消”添加桌面快捷方式“
ControlClick($T,"添加桌面快捷方式","Button4");取消”添加到开始菜单项“
ControlClick($T,"添加桌面快捷方式","Button7");取消”添加到快速启动栏“
ControlClick($T,"添加桌面快捷方式","Button1")
WinWait($T,"点击“安装”按钮继续安装")
ControlClick($T,"点击“安装”按钮继续安装","Button1")
WinWait($T,"福昕阅读器安装成功")
ControlClick($T,"福昕阅读器安装成功","Button2");取消“运行福昕阅读器”
ControlClick($T,"福昕阅读器安装成功","Button1")
Sleep(6000)
While 1
   Select
        Case ProcessExists("IEXPLORE.EXE")
                ProcessClose("IEXPLORE.EXE")
                ExitLoop
        Case ProcessExists("Maxthon.exe")
                processClose("Maxthon.exe")
                ExitLoop
        Case ProcessExists("360SE.exe")
                ProcessClose("360SE.exe")
                ExitLoop
EndSelect
Wend
发表于 2010-3-9 17:38:48 | 显示全部楼层
感谢分享。。。
发表于 2010-4-24 16:31:45 | 显示全部楼层
感谢楼主分享
发表于 2010-4-26 14:05:30 | 显示全部楼层
感谢分享!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-22 16:14 , Processed in 0.075123 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表