经过研究,得出下面结论,看注释
后面安装没有写,有兴趣再补全
Run("Kugou2012.exe")
$Hwnd = WinWaitActive("安装向导 - 酷狗音乐2012") ;父窗口
$handle = WinWait("[class:TWizardForm]") ;子窗口
WinWaitShow($handle)
ControlSend($hWnd,"",$handle,"{enter}")
WinWaitShow($handle)
ControlSetText($handle, "", "TEdit1", "D:\Program Files\KuGou2012")
$pos = WinGetPos($handle)
MouseMove($pos[0]+56,$pos[1]+170) ;移动鼠标并没有点击
;鼠标位置跟控件点击位置相同controlclick生效
ControlClick($hWnd,"",$handle,"left",1,56,170)
Func WinWaitShow($tHandle)
Do
Sleep(2000)
Until BitAND(WinGetState($tHandle),2)
EndFunc
|