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

 

相关文章: