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

MUSHclient scripting

Description of MUSHclient world function: world.ExportXML


Name ExportXML
Type Method
Summary Exports a world item in XML format
Prototype BSTR ExportXML(short Type, BSTR Name);

View list of data type meanings

Description

This lets you export one trigger, timer, alias, macro, keypad item or variable in XML format. This is symmetrical with the ImportXML function - a trigger exported with ExportXML will be syntactically correct for importing with ImportXML. However, it may not actually import if, say, there is a clash where two triggers both have the same label.

This would let you send triggers etc. from one world to another in an automated way, or from one client to another if you built some chat scripting around these functions.

The various types of things are numbered:

0 = trigger
1 = alias
2 = timer
3 = macro
4 = variable
5 = keypad


Note: Available in version 3.41 onwards.


VBscript example
world.Note world.ExportXML (0, "mytrigger")
Jscript example
world.Note (world.ExportXML (0, "mytrigger"));
PerlScript example
Note (ExportXML (0, "mytrigger"));
Python example
world.Note (world.ExportXML (0, "mytrigger"));
Lua example
Note (ExportXML (0, "mytrigger"))
Returns The XML text of the nominated item. If the "type" is not valid, or the item cannot be found, then the return value is the empty string.
Introduced in version 3.41

See also ...

Function Description
ImportXML Imports configuration data in XML format

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]

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.

[Home]


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]