本帖最后由 gywx 于 2009-7-8 15:08 编辑 #cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
Opt("TrayIconDebug", 1)
$Title = "foobar2000 v0.9.6.8 Setup"
if WinExists($Title) Then
MsgBox(4096+16,"警告","程序已在运行,请不要重复运行!!!",5)
Exit
Else
Run("foobar2000_0.9.6.8.exe")
EndIf
WinActivate($Title, "Welcome to the foobar2000 Setup")
Sleep(600)
ControlClick($Title, "Welcome to the foobar2000 Setup", "[Class:Button;INSTANCE:2]")
Sleep(600)
WinActivate($Title,"License Agreement")
ControlClick($Title,"License Agreement","[Class:Button;INSTANCE:2]")
Sleep(600)
WinActivate($Title,"Choose Install Type")
ControlClick($Title,"Choose Install Type","[Class:Button;INSTANCE:5]")
Sleep(600)
ControlClick($Title,"Choose Install Type","[Class:Button;INSTANCE:2]")
Sleep(600)
WinActivate($Title,"Choose Install Location")
ControlSetText($Title,"Choose Install Location","Edit1","C:\Program Files\foobar2000")
ControlClick($Title,"Choose Install Location","[Class:Button;INSTANCE:2]")
Sleep(600)
WinActivate($Title,"Choose Components")
ControlCommand($Title,"Choose Components","ComboBox1","SelectString","Full")
Sleep(600)
;ControlTreeView(
; How to handle the SysTreeWin32
;ControlCommand($Title,"Choose Install Location","ComboBox1","SetCurrentSelection", 2)
ControlClick($Title,"Choose Components","[Class:Button;INSTANCE:2]")
Sleep(600)
;Sleep(6000)
While not WinActivate($Title,"Completing the foobar2000 Setup")
Sleep(10)
WEnd
;WinActivate($Title,"Completing the foobar2000 Setup")
;ControlCommand($Title,"Completing the foobar2000 Setup","Button4","UnCheck")
ControlClick($Title,"Completing the foobar2000 Setup","[Class:Button;INSTANCE:2]")
While not WinActivate("foobar2000 v0.9.6.8")
Sleep(10)
WEnd
;Sleep(60)
If WinExists("foobar2000 v0.9.6.8") Then
WinClose("foobar2000 v0.9.6.8")
EndIf
------------------------------------------------------------------------------------------------------------
1. 如何操作控件SysTreeWin32,我想选择Tree中的某几项,但始终不知道如何操作?
2. 如何在CMD环境下运行脚本,以及如何在CMD环境下运行编译生成的exe文件。目前我的操作是在CMD中直接运行生成的exe,没有输出,右下脚托盘里只有一个autoit的图标。不知道现在是那里有问题?
3. AutoIt有无类似silence的安装方式?如果有,我应该怎么用?
4. AutoIt中有无办法读取到foobar的播放列表中的信息,或者是类似机器的配置信息。我想在使用中对它进行判断和修改。
谢谢 |