|
楼主 |
发表于 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}") |
|