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

Variables configuration (list)

Add...

Click to add a variable.

Edit...

Click to edit an existing variable.

Remove

Click to remove one or more selected variables from the list.

Find...

Click to find a variable based on its name or contents.

Find Next

Click to repeat the next find (find another one that matches).

Load...

Click to load variables from disk.

Save...

Click to save selected variables to disk.

Copy

Click to copy the selected variable(s) to the clipboard in XML format.

Paste

Click to paste the clipboard into the variables list. The variables must be in XML format (such as produced by the Copy button). Only variables will be pasted, if there are other types on the clipboard.

Copy and paste is intended to allow you to get/put variables onto the Forum, or exchange them between worlds or with other MUSHclient users.


Filter by:

Check to filter the visible items by the function "filter". Click on the button labelled "..." next to the "filter by" checkbox to enter the code for the scripted filter function. The filter function must be written in Lua and have a function named "filter" in the script, taking two arguments which are the name of the variable, and a table of values corresponding to the various settings for it. For example, to show only variables that start with "mxp_":


function filter (name, variable)
  return string.find (name, "^mxp_") ~= nil
end -- filter


You can use variable.contents to find out the contents if that variable if needed, and work out whether to show it or not. If the function returns the boolean value "false" then the item is not shown, otherwise it is shown in the list.

The filter script is saved in the world file, so you can use it again next time, however the filter flag is not remembered. You must explicitly enable it each time you want to filter the list.


See Also ...

Topics

Arrays
Plugins
Scripting
Variables

Command

(ConfigureVariables) Sets program variables

Dialog

Edit variable

Functions

(DeleteVariable) Deletes a variable
(GetVariable) Gets the contents of a variable
(GetVariableList) Gets the list of variables
(SetVariable) Sets the value of a variable

(Help topic: dialog=IDD_PREFS_P18)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

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]