Board index » delphi » Masking Output in Pascal ?

Masking Output in Pascal ?

I was wandering if there was a way to mask a programs output with a
screen.

For example:
 I want a program to run another program without showing the new programs
outputs.

Is this possible ?

 

Re:Masking Output in Pascal ?


If this can help you:
Under DOS, in a batch file, you can do
myprog.exe >nul
this will run the prog without writing the text outputs...
Bye
--
Vincent Picavet, Lille, France
picavetS...@worldnet.net <<<<Enlevez SPAM de mon Email!
==>Pascal, IRC,maths et Bubble Bobble : the top !!<==
                \---->Allez sur #delire !

Cjtah <cj...@dialnet.net> a crit dans l'article
<Pine.LNX.3.95.971126000454.22324B-100...@shell.dialnet.net>...

Quote
> I was wandering if there was a way to mask a programs output with a
> screen.

> For example:
>  I want a program to run another program without showing the new programs
> outputs.

> Is this possible ?

Re:Masking Output in Pascal ?


Quote
Cjtah <cj...@dialnet.net> wrote:
>I was wandering if there was a way to mask a programs output with a
>screen.

>For example:
> I want a program to run another program without showing the new programs
>outputs.

>Is this possible ?

Since you posted to c.l.p.b I will assume you would have told us
if you were using something other than a DOS version of Turbo
Pascal.  

If the program you what to execute writes to standard output,
then output can be redirected to the nul device.  For example,
something like the following could be used to invoke
PKZIP/PKUNZIP w/o altering the screen.

VAR PK,PKcmd: String;
    F: TEXT;

    Assign(F,'NUL'); Rewrite(F); Redirect(F,Stdout);
    Exec(PK, PKcmd + s);
    Undirect(F); Close(F);

You can get a copy of the file redirection procedures in
FILES.ZIP at <http://users.southeast.net/~rdonais/>

You could also use the DOS shell, as in --
Exec(GetEnv('COMSPEC'), PK+' >nul '+PKcmd + s);

    ...red

--
Support the anti-Spam amendment
  Join at http://www.cauce.org/

Other Threads