[Home] [Downloads] [Search] [Help/forum]

MUSHclient scripting

Description of MUSHclient world function: world.FixupEscapeSequences

Name FixupEscapeSequences
Type Method
Summary Converts "escape sequences" like \t to their equivalent codes.
Prototype BSTR FixupEscapeSequences(BSTR Source);

View list of data type meanings


This provides a script interface to the internal routine used by MUSHclient to convert special "escape" sequences into the ASCII equivalents.

The following sequences are recognised:

\a Bell (alert)
\b Backspace
\f Formfeed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
\' Single quotation mark
\" Double quotation mark
\\ Backslash
\? Literal question mark
\xhh ASCII character in hexadecimal notation

VBscript example
world.send world.FixupEscapeSequences ("go north \n go west")
Jscript example

// In JScript a quoted sequence like "\n" will already 
// be interpreted by the JScript interpreter
PerlScript example

// In PerlScript a quoted sequence like "\n" will already
// be interpreted by the PerlScript interpreter
Python example
Lua example

-- In Lua a quoted sequence like "\n" will already 
-- be interpreted by the Lua interpreter
Returns The source string with any escape sequences (as described above) replaced by the equivalent code.

See also ...

Function Description
FixupHTML Fixes up text for writing as HTML
Replace Replaces one substring with another
Trim Trims leading and trailing spaces 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


Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]