Console
Native console output, categories, visibility, titles and input.
Console output is mirrored to the module UI and a UTF-8 Windows console. These APIs accept one message string rather than print-style variadic values.
Output
rconsoleprint
rconsoleprint(message: string, asynchronous: boolean?, escape: boolean?): ()Prints untagged text. asynchronous defaults to false; escape defaults to true and renders embedded zero bytes as visible escapes instead of writing raw zeros.
Also available as consoleprint.
rconsoleinfo
rconsoleinfo(message: string, asynchronous: boolean?): ()Prints an informational message. asynchronous defaults to false.
Also available as consoleinfo.
rconsolewarn
rconsolewarn(message: string, asynchronous: boolean?): ()Prints a warning message. asynchronous defaults to false.
Also available as consolewarn.
rconsoleerr
rconsoleerr(message: string, asynchronous: boolean?): ()Prints an error message. asynchronous defaults to false.
Also available as consoleerr and rconsoleerror.
printconsole
printconsole(message: string, kind: string | EnumItem | {Name: string}): ()Prints a message with an explicit category. Case-insensitive categories include Output/MessageOutput, Info/Information/MessageInfo, Warn/Warning/MessageWarning and Error/MessageError; a dotted prefix is removed. Invalid categories raise an argument error.
rconsoleclear
rconsoleclear(): ()Clears the native console and the module in-game console log.
Also available as consoleclear.
clearconsole
clearconsole(): ()Clears the same logs as rconsoleclear and sends a ClearConsole command to the desktop interface.
Window and input
rconsoletop
rconsoletop(topmost: boolean): ()Sets whether the native console stays on top.
Also available as consoletop.
rconsolename
rconsolename(title: string?): ()Sets the native console title from valid UTF-8. Defaults to Lynx.
Also available as rconsolesettitle, consolesettitle and consolename.
rconsoleinput
Yieldsrconsoleinput(): stringYields until one console input line is available. Removes the line terminator and limits the returned UTF-8 string to 4096 bytes without splitting a multibyte character.
Also available as consoleinput.
rconsoleshow
rconsoleshow(): ()Creates the native console if necessary and shows it.
Also available as consoleshow.
rconsolehide
rconsolehide(): ()Hides an existing native console without destroying it.
Also available as consolehide.
rconsoletoggle
rconsoletoggle(): ()Creates the native console if needed and toggles visibility.
Also available as consoletoggle.
rconsolehidden
rconsolehidden(): booleanReturns true if the native console does not exist or is hidden.
Also available as consolehidden.
rconsolecreate
rconsolecreate(): ()Creates and shows the native console.
Also available as consolecreate.
rconsoledestroy
rconsoledestroy(): ()Flushes queued console writes and releases the native console.
Also available as consoledestroy.
Written for Lynx 0.0.0
Something unclear? Tell us on Discord