howacter 发表于 2010-1-9 03:01:12

autoit-v3-setup自动安装

本帖最后由 howacter 于 2010-1-9 03:05 编辑

今天写了个autoit-v3-setup的自动安装脚本,望各位指正。

Run("autoit-v3-setup")

WinWaitActive("AutoIt v3.3.0.0 Setup","Setup Wizard")
ControlClick("AutoIt v3.3.0.0 Setup","Setup Wizard",1)

WinWaitActive("AutoIt v3.3.0.0 Setup","License Agreement")
ControlClick("AutoIt v3.3.0.0 Setup ","License Agreement",1)

;如果已经安装了,则会弹出下面这个对话框
;选择覆盖安装
;注意下面用的是WinActive()
If WinActive("AutoIt v3.3.0.0 Setup","Previous Installation Found") Then
        ControlClick("AutoIt v3.3.0.0 Setup","Previous Installation Found",1202)
        ControlClick("AutoIt v3.3.0.0 Setup","Previous Installation Found",1)
EndIf

WinWaitActive("AutoIt v3.3.0.0 Setup","What do you want to do")       
Send("!n")
;ControlClick("AutoIt v3.3.0.0 Setup ","What do you want to do",1)
;这一句用在这里不知道为什么不行,只有改为上面的

WinWaitActive("AutoIt v3.3.0.0 Setup","Choose Components")
ControlClick("AutoIt v3.3.0.0 Setup ","Choose Components",1)

WinWaitActive("AutoIt v3.3.0.0 Setup","Choose Install Location")
ControlClick("AutoIt v3.3.0.0 Setup ","Choose Install Location",1)

WinWaitActive("AutoIt v3.3.0.0 Setup","Completing")
ControlClick("AutoIt v3.3.0.0 Setup","Completing",1203)
ControlClick("AutoIt v3.3.0.0 Setup","Completing",1)

FileCreateShortcut(@ProgramFilesDir&"\AutoIt3\SciTE\SciTE.exe",@DesktopDir&"\SciTE.lnk")
FileCreateShortcut(@ProgramFilesDir&"\AutoIt3\Au3Info.exe",@DesktopDir&"\Au3Info.lnk")

qiziyun7410 发表于 2010-1-10 16:41:58

有图就好了。更有对比

mlrw923 发表于 2010-1-12 09:59:09

好东西~~~顶了~~~~

adddddddd 发表于 2010-9-14 08:21:09

有图就好了。

88069696 发表于 2010-11-22 09:42:37

顶你。有图就好了更直观些

myang 发表于 2011-2-12 14:40:58

学习了 谢谢 分享

myang 发表于 2011-2-13 13:31:58

顶你。有图就好了更直观些

wsfda 发表于 2011-2-13 14:07:18

路过一下{:face (197):}

chenmvp8 发表于 2011-2-20 16:30:24

应该是不错的。。。

chenmvp8 发表于 2011-2-21 01:19:16

非常喜欢。。。

derek5 发表于 2011-7-19 00:39:59

{:1_306:}{:face (189):}

cfengah 发表于 2011-7-19 18:02:07

正需要{:face (356):}谢谢

june795 发表于 2011-8-18 04:52:29

我最近在笔记本电脑排行榜里 看中了部 Y460,不知好不好,大家给点意见

duguoffice 发表于 2011-8-18 20:28:57

下载东西。。。好贵。。。

chentuyu1203 发表于 2012-12-6 12:07:55

顶,不错。。。。
页: [1] 2
查看完整版本: autoit-v3-setup自动安装