找回密码
 加入
搜索
查看: 5076|回复: 12

各位坛友,自动安装COOL EDIT PRO 这一步该怎么写

[复制链接]
发表于 2008-12-18 18:51:25 | 显示全部楼层 |阅读模式
各位坛友,在自动安装COOL EDIT PRO 要结束得时候,会出现一个打开COOL EDIT PRO的界面,在这个界面中,有一个按钮叫Buy Now (现在购买),一个按钮紧挨着它叫KeepEvaluating(继续试用),就是这个按钮正在倒计时10秒钟,此时,它是灰色显示,一个按钮叫Already Purchased(已经购买),一个按钮叫About This Demo(关于这个版本),如果人工安装,我总是等倒计时10秒钟结束以后,按继续试用(Keep Evaluating),软件自动打开,然后在关闭这个软件,软件装完了。但是自动安装,出现这个界面以后,我为了等倒计时结束,这样写sleep("15000"),在用CONTROLCLICK或SEND命令,经过时间证明,行不通。其实我并不想打开这个软件,我只想安装它,深度技术论坛得一位坛友,给我出主意说,既然你不想打开它,那么你直接结束进程就可以了,因为她说的太简单,这个语句到底准确怎么写,我现在还不会,坛友们,你们有什么好主意吗?,大家尽量给我写出准确语句,我是初学者,到目前为止,在各位朋友得帮助下,勉强实现了自动安装FLASH、PHOTOSHOP、FRONTPAGE,包括COOL EDIT PRO 在内共四个软件,在河北省中小学教师教育技术能力培训中经常使用,因为电脑经常瘫痪,所以,经常要安装它们,因此,想编自动安装程序,以便降低劳动强度、显示俺本事大,各位坛友,给我出出主意吧。

[ 本帖最后由 wangjinxian 于 2008-12-21 13:07 编辑 ]

本帖子中包含更多资源

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

×
发表于 2008-12-18 19:57:57 | 显示全部楼层

刚好我也写了一个,贴出来给你看看

run("cep_v2.0 setup.exe")
winwaitactive("Cool Edit Pro 2.0 Installation","License Agreement")
controlclick("Cool Edit Pro 2.0 Installation","License Agreement","[class:Button;instance:1]")
controlclick("Cool Edit Pro 2.0 Installation","License Agreement","[class:Button;instance:3]")
while WinWaitActive("Application is Active","You should close it before continuing",4) = 1
        ControlClick("Application is Active","You should close it before continuing", "Button2")
WEnd
winwaitactive("Cool Edit Pro 2.0 Installation","Welcome!")
controlclick("Cool Edit Pro 2.0 Installation","Welcome!","[class:Button;instance:1]")
winwaitactive("Cool Edit Pro 2.0 Installation","Select destination directory")
controlclick("Cool Edit Pro 2.0 Installation","Select destination directory","[class:Button;instance:1]")
winwaitactive("Cool Edit Pro 2.0 Installation","Audio file association")
controlclick("Cool Edit Pro 2.0 Installation","Audio file association","[class:Button;instance:2]")
winwaitactive("Cool Edit Pro 2.0 Installation","Ready to install!")
controlclick("Cool Edit Pro 2.0 Installation","Ready to install!","[class:Button;instance:1]")
winwaitactive("Installation complete","The Cool Edit Pro 2.0 is now successfully installed")
controlclick("Installation complete","The Cool Edit Pro 2.0 is now successfully installed","[class:Button;instance:1]")
winwaitactive("Temporary Drive Suggestion","We suggest you use your largest hard drive for Cool Edit's temp")
controlclick("Temporary Drive Suggestion","We suggest you use your largest hard drive for Cool Edit's temp","[class:Button;instance:1]")
winwaitactive("Temporary Drive Suggestion","Cool Edit can use two temporary folders for more efficiency")
controlclick("Temporary Drive Suggestion","Cool Edit can use two temporary folders for more efficiency","[class:Button;instance:1]")
winwaitactive("Cool Edit Pro 2.00  - Trial Version (expired!)","You are currently running a trial version of Cool Edit Pro 2.0")
sleep(12000)
controlclick("Cool Edit Pro 2.00  - Trial Version (expired!)","You are currently running a trial version of Cool Edit Pro 2.0","[class:Button;instance:2]")

winwaitactive("cep20theme.ses - Cool Edit Pro","Multitrack Options")
WinClose("cep20theme.ses - Cool Edit Pro","Multitrack Options")
sleep(1000)

run("cep2reg.exe")
while WinWaitActive("Application is Active","You should close it before continuing",4) = 1
        ControlClick("Application is Active","You should close it before continuing", "Button2")
WEnd
winwaitactive("Cool Edit Pro 2.0 Installation","&Accept license agreement")
controlclick("Cool Edit Pro 2.0 Installation","&Accept license agreement","[class:Button;instance:1]")
controlclick("Cool Edit Pro 2.0 Installation","&Accept license agreement","[class:Button;instance:3]")
winwaitactive("Cool Edit Pro 2.0 Registration","If you have not obtained a license to use this software,")
controlclick("Cool Edit Pro 2.0 Registration","If you have not obtained a license to use this software,","[class:Button;instance:3]")
winwaitactive("Cool Edit Pro 2.0 Registration","Please enter your Cool Edit Pro 2 registered")
ControlSend("Cool Edit Pro 2.0 Registration","Please enter your Cool Edit Pro 2 registered","Edit1","ROR")
ControlSend("Cool Edit Pro 2.0 Registration","Please enter your Cool Edit Pro 2 registered","Edit2","200-00-3Z1XFL9C")
controlclick("Cool Edit Pro 2.0 Registration","Please enter your Cool Edit Pro 2 registered","Button1")
winwaitactive("Registration complete","Cool Edit Pro 2.0 is now installed and registered.")
controlclick("Registration complete","Cool Edit Pro 2.0 is now installed and registered.","Button1")
winwaitactive("Check Out Syntrillium Online!","You can check for new program updates")
controlclick("Check Out Syntrillium Online!","You can check for new program updates","Button3")
controlclick("Check Out Syntrillium Online!","You can check for new program updates","Button1")
winwaitactive("Cool Edit Pro  - Licensed to ROR","1992-2002 Syntrillium Software Corporation")
winclose("Cool Edit Pro  - Licensed to ROR","1992-2002 Syntrillium Software Corporation")
sleep(2000)

run("cep_v2.1 setup.exe")
while WinWaitActive("Application is Active","You should close it before continuing",4) = 1
        ControlClick("Application is Active","You should close it before continuing", "Button2")
WEnd
winwaitactive("Cool Edit Pro 2.1 Installation","&Accept license agreement")
controlclick("Cool Edit Pro 2.1 Installation","&Accept license agreement","Button1")
controlclick("Cool Edit Pro 2.1 Installation","&Accept license agreement","Button3")
winwaitactive("Cool Edit Pro 2.1 Installation","Welcome!")
controlclick("Cool Edit Pro 2.1 Installation","Welcome!","Button1")
winwaitactive("Cool Edit Pro 2.1 Installation","Ready to install!")
controlclick("Cool Edit Pro 2.1 Installation","Ready to install!","Button1")
winwaitactive("Installation complete","The Cool Edit Pro 2.1 is now successfully installed")
controlclick("Installation complete","The Cool Edit Pro 2.1 is now successfully installed","Button1")
winwaitactive("cep21-theme.ses - Cool Edit Pro","Multitrack Options")
winclose("cep21-theme.ses - Cool Edit Pro","Multitrack Options")

run("Cool2chinese.exe")
winwaitactive("Cool Edit Pro 2.0简体中文汉化包","MiTi音乐作坊")
controlclick("Cool Edit Pro 2.0简体中文汉化包","MiTi音乐作坊","Button2")
winwaitactive("Cool Edit Pro 2.0简体中文汉化包","安装到")
controlclick("Cool Edit Pro 2.0简体中文汉化包","安装到","Button3")
winwaitactive("日积月累","欢迎使用 Cool Edit Pro 2.0简体中文版")
controlclick("日积月累","欢迎使用 Cool Edit Pro 2.0简体中文版","Button2")
controlclick("日积月累","欢迎使用 Cool Edit Pro 2.0简体中文版","Button1")
winwaitactive("Cool Edit Pro  - 小T汉化","多轨选项")
winclose("Cool Edit Pro  - 小T汉化","多轨选项")
MsgBox(0, "阿迪王", "安装完成!")
 楼主| 发表于 2008-12-18 21:00:46 | 显示全部楼层
坛友,你应该加入快速反应部队,我刚发出求助,您就出手了,连我还没有来得及提出的问题都解决了,(这个问题就是我用send 输入用户名和序列号,结果失败,我看你用的是controlsend),救我于水火,我把你的脚本复制下去,看在我的电脑上得运行效果,首先向你以及所有向你一样热心的坛友们表示无限敬意,论坛因为你们而精彩。
 楼主| 发表于 2008-12-18 22:07:32 | 显示全部楼层
坛友,我试运行了你得脚本,非常成功,只有一点小小遗憾,就是在运行汉化程序得时候,总是提示错误,导致汉化失败,错误提示出现在向C:\PROGRAM FILES\COOLPRO2拷贝文件到一定程度时,我把装好得COOL EDIT PRO 卸掉,手动安装,对照你的脚本,发现似乎窗口标题不对,我都给改了,然后在运行你的脚本,依然出现相同得错误提示,坛友,你在看看到底是什么原因呢,把这个问题解决掉,脚本就完美了。

[ 本帖最后由 wangjinxian 于 2008-12-18 22:09 编辑 ]

本帖子中包含更多资源

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

×
 楼主| 发表于 2008-12-18 22:12:40 | 显示全部楼层
错误提示文字为:  错误
                  执行指定操作时遇到错误
                  请查看信息窗口获取更多信息
                          确定
 楼主| 发表于 2008-12-19 08:25:50 | 显示全部楼层
坛友,你怎么不露面了,快回来,不要丢下可怜得人不管,其他坛友也给出出主意,不要丢下我不管
发表于 2008-12-19 17:29:36 | 显示全部楼层

你好

我是按默认路径安装的原程序,如果你改过路径,汉化包也需要更改相同的路径。手动运行试试会不会出错?

[ 本帖最后由 xiaolt2008 于 2008-12-19 17:31 编辑 ]
 楼主| 发表于 2008-12-19 19:06:07 | 显示全部楼层
坛友,我都调试好了,不再出错误提示了,为了看懂你得那个WHILE 循环语句,我特意把SKYFREE得电子书使劲看了看,觉得他书上得哪几个简单例子我都能看懂,因为上学的时候学过BASIC,汉字DBASE3,但是你的这个循环是怎么控制的,我没看懂,你是怎么处理那个倒计时的,我没有懂,你的循环条件是什么,符合循环条件做什么,我不懂,坛友你能解释一下吗?
 楼主| 发表于 2008-12-20 13:53:00 | 显示全部楼层
哎呀,没人理了,可是那个循环语句俺没有看懂。那位解释一下。
 楼主| 发表于 2008-12-21 13:06:22 | 显示全部楼层
没有人告诉我那个循环语句是怎么作用得,苦恼啊,那也把帖子改成已经解决吧。感谢发出脚本得那位坛友,没有你的脚本,恐怕我得写到驴年马月。向你致敬敬礼。
发表于 2008-12-21 16:48:13 | 显示全部楼层
原帖由 wangjinxian 于 2008-12-19 19:06 发表
坛友,我都调试好了,不再出错误提示了,为了看懂你得那个WHILE 循环语句,我特意把SKYFREE得电子书使劲看了看,觉得他书上得哪几个简单例子我都能看懂,因为上学的时候学过BASIC,汉字DBASE3,但是你的这个循环是怎 ...


你好,回答你2个问题。
while WinWaitActive("Application is Active","You should close it before continuing",4) = 1
        ControlClick("Application is Active","You should close it before continuing", "Button2")
WHILE 循环语句的说明,当有这个窗口标题出现时,执行关闭窗口命令,4的意思是等待4秒钟,4秒之后就不会检测了,你可以查看WinWaitActive函数。你说那个10秒灰色的倒数按钮问题,很简单,用Sleep(12000),就是让程序等待,睡觉12秒之后再执行。点进去窗口后,用WinClose("cep20theme.ses - Cool Edit Pro","Multitrack Options")关闭程序

[ 本帖最后由 xiaolt2008 于 2008-12-21 16:52 编辑 ]
 楼主| 发表于 2008-12-21 20:05:27 | 显示全部楼层
向这位善良得坛友表示衷心感谢,从这位坛友哪里我学到了很多东西,看来我的自动安装之路还很漫长,革命尚未成功,同志仍需努力。把最美得祝福送给你,祝你一路顺风。我在研究研究。
发表于 2008-12-23 17:35:33 | 显示全部楼层
谢谢你的祝福。我也是初学者,也在求助。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-7 03:25 , Processed in 0.078366 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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