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


Script function


Read about scripting




Gets the list of world alphanumeric options


VARIANT GetAlphaOptionList();

View list of data type meanings


Returns a variant array which is a list of all options that you can get with GetAlphaOption or set with SetAlphaOption.

The examples show extracting all option names, and their values.

The option names should be reasonably self-explanatory.

Available in MUSHclient version 3.22 onwards.

VBscript example

For Each opt In world.GetAlphaOptionList
   world.note opt + " = " + cstr (world.GetAlphaOption ( opt ))

Jscript example

optionlist = new VBArray(world.GetAlphaOptionList()).toArray();

for (i = 0; i < optionlist .length; i++)
  world.note(optionlist [i] + " = " + world.GetAlphaOption (optionlist [i] ));

PerlScript example

foreach $item (Win32::OLE::in ($world->GetAlphaOptionList))
  $world->note($item . " = " . $world->GetAlphaOption($item));

Python example

for opt in world.GetAlphaOptionList: world.Note (opt)

Lua example

for k, v in pairs (GetAlphaOptionList ()) do 
  Note (v) 

Return value

It returns a variant array containing the names of all the options. Use "ubound" to find the number of options in the list. You can then use "GetAlphaOption" to return the value for that particular option, or "SetAlphaOption" to set that option value.

See Also ...


Option setting and retrieval


(GetAlphaOption) Gets the value of an alphanumeric configuration option
(GetCurrentValue) Gets the current value of a named world option
(GetDefaultValue) Gets the default value of a named world option
(GetGlobalOption) Gets the value of a global configuration option
(GetGlobalOptionList) Gets the list of global options
(GetInfo) Gets information about the current world
(GetLoadedValue) Gets value of a named world option, as loaded from the world file
(GetOption) Gets value of a named world option
(GetOptionList) Gets the list of world options
(SetAlphaOption) Sets value of a named world alphanumeric option
(SetInputFont) Sets the font for the input window
(SetOption) Sets value of a named world option
(SetOutputFont) Sets the font for the output window.

(Help topic: function=GetAlphaOptionList)

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.


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]