找回密码
 加入
搜索
查看: 3195|回复: 5

自动安装sniffer4.75问题 !!

[复制链接]
发表于 2009-4-10 15:36:56 | 显示全部楼层 |阅读模式
我是一新手,在写一个sniffer475的自动安装脚本可是到了下图这部下不去了。主要是填写邮件地址那一部。
controlclick("Sniffer Pro User Registration","Enter your name and information.",3026)
Send("{DOWN}")
;Send("{ENTER}")
WinWaitActive("Sniffer Pro User Registration","Enter your name and information.")
ControlSetText("Sniffer Pro User Registration",3002,"aa@123.com")
WinWaitActive("Sniffer Pro User Registration","Enter your name and information.")
send("!N")

请高手指点如何往下执行。文本的邮件地址是这么表示吗?

本帖子中包含更多资源

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

×
发表于 2009-4-10 23:23:51 | 显示全部楼层
ControlSetText("Sniffer Pro User Registration","Enter your name and information.","Edit","aa@123.com")
试试吧
其中的edit这个类的后面还有个枚举的数字的
自己查下窗口信息吧
发表于 2009-4-10 23:25:30 | 显示全部楼层
:请参考下我的沙盘自动安装脚本
Run('Sandboxie3.3512cn.exe')
WinWaitActive("Sandboxie 3.35.12","Please select a language.")
ControlCommand("Sandboxie 3.35.12","Please select a language.","ComboBox1","SelectString","Chinese (Simplified)")
send("{enter}")
WinWaitActive("Sandboxie 3.35.12 安装 ","许可证协议")
send("!i")
WinWaitActive("Sandboxie 3.35.12 安装 ","选择安装位置")
send("!i")
WinWaitActive("Sandboxie 3.35.12 安装 ","安装完成")
send("!n")
WinWaitActive("Sandboxie 3.35.12 安装","该驱动能在大多数计算机上成功安装。")
send("{enter}")
WinWaitActive("Sandboxie 3.35.12 安装 ","完成(&F)")
send("{enter}")
WinWaitActive("欢迎使用 Sandboxie","获取在线 Sandboxie 入门(&G)")
ControlClick("欢迎使用 Sandboxie","获取在线 Sandboxie 入门(&G)","Button3")
WinWaitActive("Sandboxie Control","")
send("!h")
send("{R}")
WinWaitActive("注册 Sandboxie","注册码");估计你就是类似这里出问题了
ControlSend("注册 Sandboxie","注册码", "Edit1", "xdowns.com")
ControlSend("注册 Sandboxie","注册码", "Edit2", "WM5BJNB")
send("!o")
WinWaitActive("注册 Sandboxie","感谢您支持 Sandboxie!")
send("{enter}")
ProcessExists ("SbieCtrl.exe") 
ProcessClose ("SbieCtrl.exe")
ProcessExists ("SbieSvc.exe") 
ProcessClose ("SbieSvc.exe")
 楼主| 发表于 2009-4-11 21:33:55 | 显示全部楼层
刚看到,谢谢您的回答。我用的send解决了这个问题,完整代码如下(还差最后一点没写完):
run("SnifferPro475.exe")
WinWaitActive("Sniffer Portable 4.7.5","Welcome to the InstallShield Wizard for Sniffer Portable 4.7.5")
send("!N")
WinWaitActive("Welcome","Welcome to the Sniffer Pro Setup")
controlclick("Welcome","Welcome to the Sniffer Pro Setup",710)
send("!N")
WinWaitActive("Software License Agreement","Please read the following License Agreement.")
send("!Y")
WinWaitActive("User Information","Please enter your name and the name of the company for whom you work")
ControlSetText("User Information","",302,"aa")
WinWaitActive("User Information","Please enter your name and the name of the company for whom you work")
send("!N")
WinWaitActive("Choose Destination Location","Setup will install Sniffer Pro in the following folder")
send("!N")
WinWaitActive("Sniffer Pro User Registration","Enter your name and information.")
ControlSetText("Sniffer Pro User Registration","",3000,"aa")
ControlSetText("Sniffer Pro User Registration","",3001,"aa")
ControlSetText("Sniffer Pro User Registration","",3004,"aa")
ControlSetText("Sniffer Pro User Registration","",3003,"aa")
controlclick("Welcome","Welcome to the Sniffer Pro Setup",3026)
Send("{DOWN}")
Send("{tab}")
WinWaitActive("Sniffer Pro User Registration","Enter your name and information.")
send("aa@aa.com")
;ControlSetText("Sniffer Pro User Registration","",3002,"aa@aa.com")
send("!N")
WinWaitActive("Sniffer Pro User Registration","Enter information about where we can contact you")
ControlSetText("Sniffer Pro User Registration","",3005,"aa")
ControlSetText("Sniffer Pro User Registration","",3007,"aa")
controlclick("Sniffer Pro User Registration","Enter information about where we can contact you",3008)
Send("{DOWN}")
Send("{tab}")
Send("{DOWN}")
Send("{tab}")
WinWaitActive("Sniffer Pro User Registration","Enter information about where we can contact you")
ControlSetText("Sniffer Pro User Registration","",3010,"1234567")
WinWaitActive("Sniffer Pro User Registration","Enter information about where we can contact you")
ControlSetText("Sniffer Pro User Registration","",3011,"123")
WinWaitActive("Sniffer Pro User Registration","Enter information about where we can contact you")
ControlSetText("Sniffer Pro User Registration","",3012,"123")
WinWaitActive("Sniffer Pro User Registration","Enter information about where we can contact you")
ControlSetText("Sniffer Pro User Registration","",3013,"12345")
WinWaitActive("Sniffer Pro User Registration","Enter information about where we can contact you")
send("!N")

WinWaitActive("Sniffer Pro User Registration")
controlclick("Sniffer Pro User Registration","*(&P)lease let us know where you",1017)
Send("{DOWN}")
Send("{tab}")
Send("{tab}")
Send("{tab}")
send("SA154-2558Y-255T9-2LASH")
send("!N")
WinWaitActive("Sniffer Pro User Registration","If you are connecting to the Internet")
send("!N")
send("!N")
WinWaitActive ("Sniffer Pro User Registration")
Sleep(5000)
send("!N")
WinWaitActive ("Sniffer Pro User Registration")
controlcommand("Sniffer Pro User Registration","Results",1022,"Uncheck")
Send("{DOWN}")
发表于 2009-6-15 15:39:54 | 显示全部楼层
确实很有用的!!!!!!!!!
发表于 2009-6-27 09:15:10 | 显示全部楼层
高手真是多啊!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 15:59 , Processed in 0.076580 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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