Page 1 of 1 1
Topic Options
#13430 - 2001-10-22 04:38 PM RedirectOutput
Anonymous
Unregistered


Hi Everyone,
I've written a kixtart script which calls 3 other kixtart scripts. Within the 3 scripts that are called, I use RedirectOutput to log some stuff to 3 different logfiles. The last of the 3 scripts called is also supposed to send some text output to the console, but for some reason it's being sent to the last file I specified in the RedirectOutput statement. Am I missing something? Do I have to RedirectOutput back to the console or something? If so, how would I accomplish this?

Thanks for your time.

Top
#13431 - 2001-10-22 04:42 PM Re: RedirectOutput
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Absolutely right : You have to toggle back to console output !

J.


btw.:

quote:

REDIRECTOUTPUT( )

Action: Allows you to redirect all screen output to a file.
Syntax: REDIRECTOUTPUT ("file name", overwrite)
Parameters: File name
- A string that names the file to which to redirect the output. If this parameter is an empty string (""), output is redirected to the screen.
Overwrite
- Optional numeric value indicating whether to clear the output file before writing any data to it. This parameter can have the following values:

0 New output data appended to the existing contents of file.
1 All data in file overwritten when the output is redirected to the file.

Remarks: If all output is redirected to a file, the AT, BIG, BOX, and CLS commands are ignored.
Returns: 0 Output redirected
Error code Function failed

REG_MULTI_SZ (multi-string) variables are returned with the pipe symbol ( | ) used as the separator between strings. If a string contains a pipe symbol character, it is represented by two pipe symbol characters ( || ).

REG_DWORD variables are returned in decimal format.
Example: IF RedirectOutput("logon.log") = 0
? "Opened 'logon.log' at " + @TIME ?
ENDIF


[ 22 October 2001: Message edited by: jpols ]

_________________________



Top
#13432 - 2001-10-22 04:45 PM Re: RedirectOutput
Anonymous
Unregistered


Ah, just needed to finish my coffee I guess. Thanks jpols for the speedy reply. For those who may be wondering how to toggle back to console output, the command is:

RedirectOutput ("")

Thanks again,

Top
#13433 - 2001-10-22 04:48 PM Re: RedirectOutput
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Yap,

by the way did I say welcome ???
No ? so ... Welcome to the board !


J.

_________________________



Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.049 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org