rkanter
(Fresh Scripter)
2007-05-31 03:54 PM
How to turn off screen output

I am trying to minimize the amount of information that appears to the user during the execution of a login script. I have tried redirectoutput but that only stops '?' commands from displaying which is actually one of the few things I want displayed. Is there any way to do this?
Thanks,
-Ron


Mart
(KiX Supporter)
2007-05-31 04:03 PM
Re: How to turn off screen output

Sure. You can put a $rc = in front of lets say the writeline command. The return code will be stored in $rc and will not show on the screen unless you put ? $rc in your script.

KiXtart FAQ & How to's » Suppressing Results when running scripts


rkanter
(Fresh Scripter)
2007-05-31 04:16 PM
Re: How to turn off screen output

I am actually trying turn off output for 'use', 'copy', etc. Rather than modifying every line isn't there a way to just turn off the screen then after running a few lines, turning it on again?

Mart
(KiX Supporter)
2007-05-31 04:26 PM
Re: How to turn off screen output

Nope.
What do you see on the screen when you use copy and use?


rkanter
(Fresh Scripter)
2007-05-31 05:26 PM
Re: How to turn off screen output

Basically I see all the confirmations that the files was copied or the drive was mapped. There are several other commands that I use that are giving similar output.

Mart
(KiX Supporter)
2007-05-31 08:22 PM
Re: How to turn off screen output

Can you post a piece of code that gives you the screen output?
Copy and use set @error but should not show the error on the screen by default.


Richard H.Administrator
(KiX Supporter)
2007-06-04 09:25 AM
Re: How to turn off screen output

Are you using "SHELL" to execute the USE and COPY commands?

You should use the KiXtart builtins instead of the CMD commands - the KiXtart commands will not generate output to the screen and will allow you better control from the script.

There are simple ways of reducing the output from other SHELLed commands.

Post your script for review.