🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.borland-delphi
5 messages
5 total messages Started by 0BIT Sat, 15 Mar 2003 12:01
.bat output to memo
#1708
Author: 0BIT
Date: Sat, 15 Mar 2003 12:01
18 lines
1726 bytes
Hi,

I use TCustomRunFile to execute a batch file, how can I direct the output to
a memo (or something like that) ?

Now I use something like this:

    f:=TCustomFileRun.Create(self);
    f.FileName:='hello.bat';
    f.Parameters:='helloparam1';
    f.Execute;
    f.Destroy;

And how do I know when the batch file is done ?


Greetings,
0BIT
Re: .bat output to memo
#1709
Author: venuslocal
Date: Sat, 15 Mar 2003 14:07
17 lines
1826 bytes
"0BIT" <someone@123.com> wrote in message
news:5CEca.82427$Pp1.72983@amsnews02.chello.com...
> Hi,

you could use the redirection operator > to output the result to a file and
load it into your memo. for example, this command at the command prompt will
redirect the output to c:\test.txt

dir > c:\test.txt

then just load that into the memo. HTH.

--
"Hey! Watch the heart!" - Spike

http://www.planeted.co.uk
Re: .bat output to memo
#1710
Author: 0BIT
Date: Sun, 16 Mar 2003 10:44
29 lines
2134 bytes
So it's not possible to directly output to a memo ?
Even for .exe and .com programs ?

Thanks for your help,
0BIT

"venuslocal" <venuslocal@NOSPAM.hotmail.com> wrote in message
news:b4vc3e$h4u$1@knossos.btinternet.com...
>
> "0BIT" <someone@123.com> wrote in message
> news:5CEca.82427$Pp1.72983@amsnews02.chello.com...
> > Hi,
>
> you could use the redirection operator > to output the result to a file
and
> load it into your memo. for example, this command at the command prompt
will
> redirect the output to c:\test.txt
>
> dir > c:\test.txt
>
> then just load that into the memo. HTH.
>
> --
> "Hey! Watch the heart!" - Spike
>
> http://www.planeted.co.uk
>
>
Re: .bat output to memo
#1711
Author: KLinZ
Date: Sun, 16 Mar 2003 14:40
29 lines
2377 bytes
0BIT wrote:
>
> "venuslocal" <venuslocal@NOSPAM.hotmail.com> wrote in message
> news:b4vc3e$h4u$1@knossos.btinternet.com...
>>
>> "0BIT" <someone@123.com> wrote in message
>> news:5CEca.82427$Pp1.72983@amsnews02.chello.com...
>>> Hi,
>>
>> you could use the redirection operator > to output the result to a
>> file and load it into your memo. for example, this command at the
>> command prompt will redirect the output to c:\test.txt
>>
>> dir > c:\test.txt
>>
>> then just load that into the memo. HTH.
>>
> So it's not possible to directly output to a memo ?
> Even for .exe and .com programs ?
>
> Thanks for your help,
> 0BIT

You can use pipes for that. It's been done before, so do a search on google
like 'pipes stdout redirect' or something.


--
www.zenobits.com
Re: .bat output to memo
#1712
Author: Aaron Miles
Date: Mon, 17 Mar 2003 00:41
29 lines
1993 bytes
I had something like that and tested it !! It did work and I got it from
www.torry.net

Thanks

Aaron
"0BIT" <someone@123.com> wrote in message
news:5CEca.82427$Pp1.72983@amsnews02.chello.com...
> Hi,
>
> I use TCustomRunFile to execute a batch file, how can I direct the output
to
> a memo (or something like that) ?
>
> Now I use something like this:
>
>     f:=TCustomFileRun.Create(self);
>     f.FileName:='hello.bat';
>     f.Parameters:='helloparam1';
>     f.Execute;
>     f.Destroy;
>
> And how do I know when the batch file is done ?
>
>
> Greetings,
> 0BIT
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads