[au3]Const $WM_CHAR =258
$hCMDWIN=WinGetHandle("[CLASS:ConsoleWindowClass]")
_SendMessage($hCMDWIN,$WM_CHAR,Asc("A"),0)
Func _SendMessage($hWnd, $iMsg, $wParam = 0, $lParam = 0, $iReturn = 0, $wParamType = "wparam", $lParamType = "lparam", $sReturnType = "lparam")
Local $aResult = DllCall("user32.dll", $sReturnType, "SendMessage", "hwnd", $hWnd, "int", $iMsg, $wParamType, $wParam, $lParamType, $lParam)
If @error Then Return SetError(@error, @extended, "")
If $iReturn >= 0 And $iReturn <= 4 Then Return $aResult[$iReturn]
Return $aResult
EndFunc[/au3]
class的名称你可以用au3自带的win info来查。 |