Search FAQ

GetOptionList

Script function

world.GetOptionList

Read about scripting

Type

Method

Summary

Gets the list of world options

Prototype

VARIANT GetOptionList();

View list of data type meanings

Description

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

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.GetOptionList
    world.note opt + " = " + cstr (world.GetOption ( opt ))
Next


Jscript example

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

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


PerlScript example

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


Python example

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


Lua example

for k, v in pairs (GetOptionList()) do 
  Note (v, " = ", GetOption (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 "GetOption" to return the value for that particular option, or "SetOption" to set that option value.


See Also ...

Topic

Option setting and retrieval

Functions

(GetAlphaOption) Gets the value of an alphanumeric configuration option
(GetAlphaOptionList) Gets the list of world alphanumeric options
(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
(GetLoadedValue) Gets value of a named world option, as loaded from the world file
(GetOption) Gets value of a named world option
(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=GetOptionList)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

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