Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.AnsiNote


Name AnsiNote
Type Method
Summary Make a note in the output window from text with ANSI colour codes imbedded
Prototype void AnsiNote(BSTR Text);
Description

Sends "Text" to the output window, changing colour, bold, underline etc. if it gets ANSI sequences in the text. ANSI sequences are things like ESC [ 30 m. You can use the ANSI function to set them up.

AnsiNote saves the current world note colour, and restores it afterwards, so that any colour changes do not persist to subsequent note lines.

The ANSI sequences defined in the ANSI function will be recognised.

WARNING: Bold italic, and underlined styles will only be visible if the appropriate configurations are enabled in the world Appearance: Output configuration. Otherwise they will be ignored (the same as for text arriving from the MUD).


Note: Available in version 3.37 onwards.


VBscript example
AnsiNote ANSI (32) & ANSI (1) & ANSI (43) & _
          "This is bold green text on a yellow background"
Jscript example
AnsiNote (ANSI (32) + ANSI (1) + ANSI (43) + 
         "This is bold green text on a yellow background");
PerlScript example
AnsiNote (ANSI (32) . ANSI (1) . ANSI (43) . 
         "This is bold green text on a yellow background");
Python example
world.AnsiNote (world.ANSI (32) + world.ANSI (1) + world.ANSI (43) + 
"This is bold green text on a yellow background")
Lua example
AnsiNote (ANSI (32, 1, 43),
          "This is bold green text on a yellow background")
Lua notes
You can supply multiple arguments, which are concatenated together.
Returns Nothing.
Introduced in version 3.37

See also ...

Function Description
ANSI Generates an ANSI colour sequence
ChatNote Does a note using ANSI codes for the chat system
ColourNote Sends a message to the output window in specified colours
Note Sends a note to the output window
NoteStyle Sets the style for notes
StripANSI Strips ANSI colour sequences from a string

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.