world.GetGlobalOptionList

MUSHclient script function (Method) — introduced in version 4.18

Gets the list of global options

Prototype

VARIANT GetGlobalOptionList();

Data type meanings

Description

Returns a variant array which is a list of all global options that you can get with GetGlobalOption. Global options are client-wide options that are not tied to a particular world.

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

The option names should be reasonably self-explanatory.

VBscript example

For Each opt In world.GetGlobalOptionList
    world.note opt + " = " + cstr (world.GetGlobalOption ( opt ))
Next

Jscript example

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

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

PerlScript example

foreach $item (Win32::OLE::in ($world->GetGlobalOptionList))
 {
 $world->note($item . " = " . $world->GetGlobalOption($item));
 }

Python example

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

Lua example

for k, v in pairs (GetGlobalOptionList()) do 
  Note (v, " = ", GetGlobalOption(v)) 
end

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 "GetGlobalOption" to return the value for that particular option.

Related topic

Option setting and retrieval

See also

FunctionDescription
GetAlphaOptionGets the value of an alphanumeric configuration option
GetAlphaOptionListGets the list of world alphanumeric options
GetGlobalOptionGets the value of a global configuration option
GetOptionGets value of a named world option
GetOptionListGets the list of world options
SetAlphaOptionSets value of a named world alphanumeric option
SetOptionSets value of a named world option