找回密码
 加入
搜索
查看: 5099|回复: 8

[原创] PPS网络电视

  [复制链接]
发表于 2010-9-14 23:29:19 | 显示全部楼层 |阅读模式
$title= "PPS影音"
WinWait($title,"PPS影音 安装向导")
ControlClick($title,"PPS影音 安装向导","下一步(&N) >")

WinWait($title,"选择附加任务")
ControlClick($title,"选择附加任务","创建快速启动快捷方式")
sleep(100)
ControlClick($title,"选择附加任务","开机自动运行PPS影音")
sleep(100)
ControlClick($title,"选择附加任务","安装PPS影讯屏保")
sleep(100)
ControlClick($title,"选择附加任务","下一步(&N) >")

WinWait($title,"选择文件关联")
ControlCommand ($title,"选择文件关联","ComboBox1","SetCurrentSelection","2")
sleep(100)
ControlClick($title,"选择文件关联","Button2")

WinWait("安装","免费的Google工具栏",1)
ControlClick("安装","免费的","安装 Google 工具栏")
sleep(100)
ControlClick("安装","免费的","下一步(&N) >")

WinWait($title,"选择推荐软件",1)
If WinExists($title,"选择推荐软件")=1 Then
WinWait($title,"选择推荐软件")
ControlClick($title,"选择推荐软件","全不选")
sleep(100)
ControlClick($title,"选择推荐软件","安装(&I)")
WinWait($title,"完成(&F)")
ProcessClose ("PPS网络电视.exe")
Exit
Else
WinWait($title,"完成(&F)")
ProcessClose ("PPS网络电视.exe")
EndIf
 楼主| 发表于 2010-9-17 20:22:52 | 显示全部楼层
回复 2# tjz257


    用不用延时其实都是可行的。。用延时就是怕有些旧机器反应不过来照成脚本出错
发表于 2010-9-18 01:49:09 | 显示全部楼层
不用RUN先让安装程序运行吗
 楼主| 发表于 2010-9-18 02:32:57 | 显示全部楼层
本帖最后由 121044246 于 2010-9-18 22:08 编辑

回复 4# 4216730


    要的.这个你可以自己添加一下就好了..

我自己用的是这样写的,你可以参考一下

在安装程序的目录在创建一个文件夹,文件夹名称可以随便取,我是把脚本都放Auto_install里面
$title= "PPS影音"
$path=StringLeft(@ScriptDir, StringInStr(@ScriptDir, "", 0, -1));取得上级目录路径,
$soft=$path&"PPS网络电视.exe";安装程序的路径,
If FileExists($soft) = 0 Then Exit
;========检测是否安装此软件,已安装则自动退出脚本==============
For $i =1 To 1000
$read=RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",$i)
If $read = "PPStream" Then
Exit
EndIf        
Next
ShellExecute($soft)
WinWait($title,"PPS影音 安装向导")
ControlClick($title,"PPS影音 安装向导","下一步(&N) >")

WinWait($title,"选择附加任务")
ControlClick($title,"选择附加任务","创建快速启动快捷方式")
sleep(100)
ControlClick($title,"选择附加任务","开机自动运行PPS影音")
sleep(100)
ControlClick($title,"选择附加任务","安装PPS影讯屏保")
sleep(100)
ControlClick($title,"选择附加任务","下一步(&N) >")

WinWait($title,"选择文件关联")
ControlCommand ($title,"选择文件关联","ComboBox1","SetCurrentSelection","2")
sleep(100)
ControlClick($title,"选择文件关联","Button2")

WinWait("安装","免费的Google工具栏",1)
ControlClick("安装","免费的","安装 Google 工具栏")
sleep(100)
ControlClick("安装","免费的","下一步(&N) >")

WinWait($title,"选择推荐软件",1)
If WinExists($title,"选择推荐软件")=1 Then
WinWait($title,"选择推荐软件")
ControlClick($title,"选择推荐软件","全不选")
sleep(100)
ControlClick($title,"选择推荐软件","安装(&I)")
WinWait($title,"完成(&F)")
ProcessClose ("PPS网络电视.exe")
Exit
Else 
WinWait($title,"完成(&F)")
ProcessClose ("PPS网络电视.exe")
EndIf

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2010-9-18 03:59:42 | 显示全部楼层
学习了你的第二 三行的写法
如果第二行不减1,第三行就不用"\",不是更方便点吗
 楼主| 发表于 2010-9-18 10:40:35 | 显示全部楼层
本帖最后由 121044246 于 2010-9-18 22:08 编辑

回复 6# 4216730


呵呵,你没说我一直都没注意这个..真的是画蛇添足了...
其实还有一个办法就是写把路径写入INI,然后读取INI的路径也可以
发表于 2010-9-22 19:05:20 | 显示全部楼层
楼主辛苦了,我觉得这东东太强了
发表于 2010-12-12 22:03:53 | 显示全部楼层
路过支持下
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-22 00:41 , Processed in 0.092481 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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