I've looked through
http://www.appinf.com/docs/poco/Poco.Process.html
Could not find much there to point me in the right directoin just when
they get to the good stuff they write...
PipeInputStream istr(outPipe);
... // read output of ps from istr
int rc = ph.wait();
Any way this is what I tried, and not surprisingly it crashes!
system = require("system");
var cmdErr = new system.Pipe();
var cmdOut = new system.Pipe();
var cmdIn= new system.Pipe();
// something trivial
var getInfo = new system.Process("cmd", ["/c", "dir", "/b", "/ad", "G:
\\hold"], cmdIn,
cmdOut, cmdErr );
getInfo.wait();
print("\nDir out put length plus text follows: \n\n");
var xx;
var text ="";
// var find = 0;
var inputStream = new system.PipeInputStream(cmdOut);
inputStream.seek(system.InputStream.SEEK_BEG);
while (inputStream.eof != true)
{
print(inputStream.pos);
hold = inputStream.read(1);
text += hold.decodeToString();
print("ok");
lookAhead = inputStream.peek();
if (lookAhead == inputStream.eof)
{
break;
}
}
print(inputStream.pos + "\n");
print(text);
But I am afraid I am on the wrong track