; Need #include <WinAPI.au3>
Func ReadCMD()
Local $tBuffer = DllStructCreate("char"), $nRead, $sRet = ""
Local $hFile = _WinAPI_CreateFile("CON", 2, 2)
While 1
_WinAPI_ReadFile($hFile, DllStructGetPtr($tBuffer), 1, $nRead)
If DllStructGetData($tBuffer, 1) = @CR Then ExitLoop
If $nRead > 0 Then $sRet &= DllStructGetData($tBuffer, 1)
WEnd
_WinAPI_CloseHandle($hFile)
Return $sRet
EndFunc ;==>_ConsoleRead
No comments:
Post a Comment