183712314 发表于 2010-12-19 17:23:16

光盘刻录大师自动安装脚本


Opt("MouseCoordMode", 0)
Opt("WinTitleMatchMode", 2)
Opt("GUICloseOnESC",0)
Dim $Title1= "安装程序 - 光盘刻录大师(免费版)"
Dim $Title2="文件夹已存在"
Dim $Text1 = "欢迎安装 光盘刻录大师(免费版)"
Dim $Text2="许可证"
Dim $Text3="用户信息"
Dim $Text4="选择安装文件夹"
Dim $Text5="文件夹:"
Dim $Text6="选择 开始 目录"
Dim $Text7="选择额外任务"
Dim $Text8="准备安装"
Dim $Text9="完成 光盘刻录大师(免费版) 安装向导"
If Not FileExists(@ScriptDir&"\光盘刻录大师.exe") Then
TrayTip("错误!","安装文件未找到!"&@CRLF&"5秒后自动退出", 5, 1)
Sleep(3000)
Exit
EndIf
Run(@ScriptDir&"\光盘刻录大师.exe")
TrayTip("提示", "最好关闭安全软件,以免影响自动安装效果"&@CRLF&"自动安装期间,请勿动键盘鼠标", 5, 1)
Sleep(3000)
ProcessClose("360chrome.exe")
ProcessClose("iexplore.exe")
ProcessClose("115br.exe")
ProcessClose("360se.exe")
WinWaitActive($Title1, $Text1)
ControlClick($Title1, $Text1, "TButton1")
WinWaitActive($Title1, $Text2)
ControlClick($Title1, $Text2, "TRadioButton1")
ControlClick($Title1, $Text2, "TButton2")
WinWaitActive($Title1, $Text3)
ControlClick($Title1, $Text3, "TButton2")
WinWaitActive($Title1, $Text4)
ControlClick($Title1, $Text4, "TButton3")

Do
        If WinExists($Title2, $Text5)        Then
                WinWaitActive($Title2, $Text5)
                ControlClick($Title2, $Text5, "Button1")
        EndIf
       
Until        WinExists($Title1, $Text6)
WinWaitActive($Title1, $Text6)
ControlClick($Title1, $Text6, "TButton4")
WinWaitActive($Title1, $Text7)
Send("{tab} {space} !N")
WinWaitActive($Title1, $Text8)
ControlClick($Title1, $Text8, "TButton4")
WinWaitActive($Title1, $Text9)
Sleep(1000)
ProcessClose("360chrome.exe")
ProcessClose("iexplore.exe")
ProcessClose("115br.exe")
ProcessClose("360se.exe")
WinActive($Title1, $Text9)
ControlClick($Title1, $Text9, "TButton4")
Sleep(500)
ProcessClose("AllInOneFree.exe")
TrayTip("提示", "已经安装完成", 3, 1)
Sleep(3000)
Exit
下午刚做好的.费了不少脑筋...有侍完善..后期再说吧!
页: [1]
查看完整版本: 光盘刻录大师自动安装脚本