Run("Thunder7.1.0.1962.exe")
WinWaitActive("迅雷7安装程序")
ControlClick("迅雷7安装程序","","Button1")
WinWaitActive("迅雷7安装程序")
Send("{TAB}{TAB}")
WinWaitActive("迅雷7安装程序")
$Str = _
'd:\Program Files\Thunder Network\Thunder'
ControlSetText("迅雷7安装程序","","Edit1","d:\Program Files\Thunder Network\Thunder")
;修改指定控件的文本
WinWaitActive("迅雷7安装程序")
ControlClick("迅雷7安装程序","","Button7")
WinWaitActive("迅雷7")
ControlClick("迅雷7","","Button2")
ControlClick("迅雷7安装程序","","Button1")
Sleep(3*1000)
If WinExists("迅雷7") Then
ControlClick("迅雷7","","Button2")
EndIf
WinWaitActive("迅雷7安装程序")
Send("{TAB}{TAB}")
WinWaitActive("迅雷7安装程序")
ControlClick("迅雷7安装程序","","Button4")
ControlClick("迅雷7安装程序","","Button5")
ControlClick("迅雷7安装程序","","Button1")
以上是一个同学的代码,看上去是有效的,但在某些机子上不能正常运行,缺理性,兼容性。迅雷版本是Thunder7.1.0.1962,主要问题在于认不到文本。请指教。 |