Re: question catching system message

new topic     » goto parent     » topic index » view thread      » older message » newer message

Salix wrote:
> 
> jacques deschĂȘnes wrote:
> > 
> > what's wrong this method its simple and effective.
> > You can also do
> > system("dir *.txt > temp.txt 2> error.txt",2)
> 
> There's nothing wrong with it. It saves the output I want into a temp file.
> But later I need to open that file, collect its content, and delete it 
> afterwards.
> 
> But to collect the output directly into an Euphoria object would be simplier
> and even more effective.
> 
> (But I can live without it.)
> 
> Regards,
> 
> Salix

The text of the dir output is not returned, it is... simply written to a device,
possibly redirected.
If you use a RAM disk, then perhaps you can make DOS write to some area of
memory which it would think to be a file, and you'd peek that area. That's all I
can see.
Or - let's be fancy - make a TSR that trap DOS output to console, and have the
TSR communicate with your program using some interrupt.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu