暴风影音2009 3.09.06.25 自动安装脚本
#Region ;**** 参数创建于 ACNWrapper_GUI ****#AutoIt3Wrapper_icon=..\ico\storm.ico
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
$variable0="安装 暴风影音2009"
$variable1="欢迎安装 暴风影音2009"
$variable2="许可证协议"
$variable3="选择组件和需要创建的快捷方式"
$variable4="选择安装位置"
$variable5="暴风影音推荐 - 装机必备"
$variable6="暴风影音2009 安装完成"
$variable7=""
$variable8=""
$variable9=""
$directory="C:\Program Files\StormII"
AdlibEnable("KillIE")
opt("mousecoordmode",2)
Run("Storm2009.exe")
TrayTip("正在安装","暴风影音2009请稍后......",10,1)
WinWaitActive($variable0,$variable1)
Send("!n")
WinWaitActive($variable0,$variable2)
ControlClick($variable0,$variable2,"Button2")
WinWaitActive($variable0,$variable3)
MouseMove(0, 0,2)
MouseClick("left", 190, 171, 1)
MouseClick("left", 224, 186, 1)
MouseClick("left", 224, 203, 1)
ControlClick($variable0,$variable3,"Button2")
WinWaitActive($variable0,$variable4)
ControlSetText($variable0,$variable4,"Edit1",$directory)
ControlClick($variable0,$variable4,"Button2")
sleep(300)
WinWaitActive($variable0,$variable6)
ControlClick($variable0,$variable6,"Button4")
ControlClick($variable0,$variable6,"Button2")
sleep(3000)
If ProcessExists("iexplore.exe") Then
ProcessClose("iexplore.exe")
EndIf
Func KillIE()
If ProcessExists("iexplore.exe") Then ProcessClose("iexplore.exe")
If WinExists("安装 暴风影音2009","免费的Google工具栏,搜索更简单") Then
ControlClick("安装 暴风影音2009","免费的Google工具栏,搜索更简单","Button4")
Send("!i")
ElseIf WinExists($variable0,$variable5)Then
Send("{SPACE}{TAB}{SPACE}{TAB}{SPACE}")
Send("!n")
EndIf
EndFunc
最新版的安装脚本,唯一不足的就是会自动弹出防火墙设置的没有弄了。自己手动点击一下吧。
以下是自动设置暴风影音的脚本。因为自己是菜鸟所以呢脚本也比较菜,不过能达到目的就行了。。。
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\ico\23.ico
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
TrayTip("注意:","正在设置暴风影音2009请稍后......",10,1)
opt("mousecoordmode",2)
run("C:\Program Files\StormII\Storm.exe")
Sleep(5000)
msgBox(0,"提示:本窗口五钟内自动关闭","请手动点击暴风影视黑色播放区域否则无法继续","5")
WinActivate("暴风影音","展示页")
MouseMove(0, 0,2)
MouseClick("left", 415, 17, 1)
MouseClick("left", 460, 200, 1)
MouseMove(0, 0,2)
sleep(4000)
MouseClick("left", 180, 200, 1)
MouseClick("left", 35, 174, 1)
MouseClick("left", 180, 70, 1)
MouseClick("left", 180, 150, 1)
MouseClick("left", 180, 333, 1)
MouseClick("left", 35, 250, 1)
MouseClick("left", 180, 70, 1)
MouseClick("left", 35, 350, 1)
MouseClick("left", 180, 68, 1)
MouseClick("left", 180, 94, 1)
MouseClick("left", 435, 390, 1)
sleep(1000)
MouseMove(0, 0,2)
MouseClick("left", 507, 17, 1) 我想请教一下,你的代码中,MouseClick函数中是怎样获取安装界面的X,Y值的?能否赐教啊,谢谢啦 2# ytxldc
我是用土方法,把窗口拖到屏幕的左上角,然后取得X和Y坐标值的。而且屡试不爽。 :face (29):高,我也试试 为什么不试试“ControlClick”呢? “ControlClick”操作控件更稳定,但是在安装暴风影音到下图界面时好像是没法控制的,这时就能用到“MouseClick”,另外是想学一下“MouseClick”的用法,新手,大家别见笑啊! LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK LLLOOOOOOOOOOOOK
页:
[1]
2