Capturing System_ Output

BlitzMax Forums/BlitzMax Programming/Capturing System_ Output

I'm using System_ to call an external batch file. Is there a way to capture the output instead of opening a new command window?

I'm currently using simply:
System_("blah.bat ops")


This waits just fine, but opens a new window for the external file.

Use the freeprocess class to handle externaly executed applications and you'll get ride of the standardoutput, standarderror and standardinput streams like a charm. I've got no sample here to show you, but you could take a look to the MaxIDE code to see how compiled programs are runned and everything redirected to the maxide console.