Func KeySend($hWnd,$Virtual_Key_Code) if Not IsHWnd($hWnd) Then _ $hWnd = GUICtrlGetHandle($hWnd) _SendMessage($hWnd,$WM_KEYDOWN,$Virtual_Key_Code,0) _SendMessage($hWnd,$WM_KEYUP,$Virtual_Key_Code,0) EndFunc Func TextSend($hWnd,$Text) if Not IsHWnd($hWnd) Then _ $hWnd = GUICtrlGetHandle($hWnd) For $i = 1 To StringLen($Text) $Char = StringMid($Text,$i,1) _SendMessage($hWnd,$WM_CHAR,AscW($Char),0) Next EndFunc