AutoIT: WinActivate可以把要操作的窗口提前。

If WinExists("[CLASS:Notepad2]") Then
    Local $hWnd = WinWait("[CLASS:Notepad]", "",10)
     ; Convert the handle to a string.
    Local $sHWnd = String($hWnd)
    WinActivate("[CLASS:Notepad]")
    ;WinWaitActive("[class:Notepad]")
    Send("Hello")
EndIf

 

posted @ 2013-08-16 15:27  chenpassion  阅读(2205)  评论(0编辑  收藏  举报