多谢楼上哥们,,俺比较少玩自动化方面的东东,无知见解见笑了。。
你用的那个udf没有下载,,感觉内置函数能达到的目的用udf有点性能浪费。。所以稍微改了下
#cs
Code by ACN--zghwelcome
modify yamakawa
#ce
Run ("control.exe Appwiz.cpl")
Sleep(2000)
$hWnd = WinGetHandle('[class:CabinetWClass]','')
If $hWnd = 0 Then
ConsoleWrite("$hwnd is 0" & @CRLF)
Exit
EndIf
$hWnd_DirectUIHWND = ControlGetHandle($hWnd,'','[CLASS:DirectUIHWND; INSTANCE:1]')
If $hWnd_DirectUIHWND = 0 Then
ConsoleWrite("$hwnd_directuihwnd is 0" & @CRLF)
Exit
EndIf
$sSize = ControlGetPos($hWnd_DirectUIHWND,'','')
If @error Then
ConsoleWrite("$ssize is 0" & @CRLF)
Exit
EndIf
ControlClick($hWnd_DirectUIHWND,'','','left',2,$sSize[2]-10,10)
ControlSend($hWnd_DirectUIHWND,"","", 'Apple')
ConsoleWrite("Finished!" & @CRLF)
|