ConLog - Write messages to the Console and/or the Log-window

From STX Wiki
Jump to navigationJump to search
CONLOG [line1 [line2 ..]] [ options ]
Write the specified text-lines (line1, ...) to the Console window and/or the Log-window. This function can be used by scripts to write error- and progress-information to the Console. It
argument description
line1, line2, ... The text lines to be written to the window(s).
option description default
/Noconsole Output only to the Log-window and not to the Console window.
/Shell Write the prefix appid:currtime - before each text line. Where appid is the value of variable AppName and currtime is the current time (hh.mm.ss).
/Error Write the prefix Error! - before each text line.
/Warning Write the prefix Warning! - before each text line.
/X
/X=n
Exit from n macro levels. If /X (eXit) is supplied without a number, the number of levels n is set to 2 (return to caller).

(see command EXIT for details)

/Ton Turn timer on. If timer is already active, the elapsed time (since timer was started) is displayed.
/Toff Turn timer off (if active) and display elapsed time (since timer was started).
/Result
Result=res
With this option the result value to be returned with the /X option can be specified. If the value res is not supplied, an empty string ('') is returned.
/Progress If this option is supplied, all other options are ignored and the text is written to the Console window only. The first line is written with the overwrite mode, this means the text line1 replaces the last output line.
/File=x Appends the text lines to the file with path x (opened temporary in text-append mode) or to the fileitem x (if x is the id of a textfileitem)
RESULT description
undefined if /X is not supplied
'res' or '' if /X is supplied; the value is returned to the macro selected by the level n specified with the option /X.
See also

LogWindow, UM and EM, MsgBox

Navigation menu

Personal tools