I want to capture the output of a command line application in real time and
not all together after the app has finished (e.g. c:\dir *.* /s > logfile
and then load the contents of logfile) . All the examples I found out use
CreateProcess but the output of the command line is loaded at the end.
Thank you very much
Yes if you please I would like the component you have. How can I get it?
"Ryan Mills" <rmcon...@mills-enterprise.ca> wrote in message
news:8pv3i0dhdtrg2dq6e...@4ax.com...
> If you are familiar with using pipes, then you can actually pipe the
output of
> the command line application back into your program. I believe I have a
> component available for this type of thing....if you want a copy of it?
>
> Ryan.
TRedirector http://www.pana.com/robert/Dcomp.html
TGUI2Console www.delphipages.com in the 'NonVisual' section
code example: http://www.prel.btinternet.co.uk/downloads/console.zip
http://www.delphi3000.com/articles/article_2112.asp
http://www.torry.net/tasks.htm, look for DosCommand
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
I downloaded doscommand and I would like to try TRedirector as well, but the
link is dead. Any other place where I can download it?
Thank you
"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
news:VA.0000b1a...@nomail.please...
I don't have any other link. Search for it via Google.
Please note: I didn't write this, but I do use it. It does have it's problems
but I've never really found them to be show stoppers, just annoying.
HTH,
Ryan
I have a TMemo in a form and a button. In the OnClick of the button I write
:
var t : TEcecutionLibrary;
cmd : string;
begin
t := TExecutionLibrary(memo1); // my tmemo
t.command := cmd
t.execute;
..........................
end;
How can I use the t.OnLineAvailable???
Thank you
"Ryan Mills" <rmcon...@mills-enterprise.ca> wrote in message
news:iro6i05hkgcc1j9b7...@4ax.com...
DosCommand worked better for my case than TRedirector.
However, the original doscommand version has an annoying
memory leak which would crash my app after 50,000 or more
calls. The corrected code can be found on the author's page
and is called doscommand_tk:
http://maxxdelphisite.free.fr/
Jacques
Hi Peter:
You might try the Doscommand.OnNewLine event instead of the OnTerminated.
Jacques
Thank you
Ο "Jacques Oberto" <j...@nospam.com> έγραψε στο μήνυμα
news:4124...@newsgroups.borland.com...
>
> "Peter S." <pe...@hotmail.com> a ιcrit dans le message de
Hi Peter,
I don't have the TRedirector component handy and its link
seems to be down at the moment. Any other source ?
For DosCommand, I use the following and it's pretty fast, at
least with netstat or any other regular dos stuff:
-----------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
begin
DosCommand1.CommandLine := 'netstat -a';
DosCommand1.OutputLines := Memo1.Lines;
DosCommand1.Execute;
end;
-----------------------------------------------------
Jacques
What you may want to do is register the component in a package,
that way the IDE can create that for you.
The procedure you need to declare needs to look someting like this
Form1 = class(TForm)
private
procedure DoLineAvailable(Sender : TComponent; Line : string);
end;
HTH,
Ryan.
"Jacques Oberto" <j...@nospam.com> wrote in message
news:4124...@newsgroups.borland.com...