Read console output
Posted: Sat May 24, 2008 3:20 am
See this example:
Im trying to read the output but cant.
Yes, i know i can run it from runprogram. But the problem is that i found some commandline that dont let me catch the output by that way and im trying to see if i can do it by this way.
Thanks in advance for any help
Code: Select all
If OpenConsole()
ConsoleTitle("Lets see")
ApplicationName.s = "cmd.exe /c ping google.com"
If WinExec_(@ApplicationName.s, #SW_SHOWNORMAL) = 0
MessageRequester("ERROR", Str(GetLastError_()) , #PB_MessageRequester_Ok)
EndIf
Repeat
Delay(20)
Until GetAsyncKeyState_(#VK_ESCAPE)
EndIf
End
Yes, i know i can run it from runprogram. But the problem is that i found some commandline that dont let me catch the output by that way and im trying to see if i can do it by this way.
Thanks in advance for any help