The ScriptConfig object is accessed via the ScriptInitData.config and the Script.config properties. The ScriptInitData.config property allows a script (in its OnInit method) to specify what configuration properties it supports, and provide default values for them. The properties assigned in OnInit will then be available in Preferences for the user to edit, and the user-edited configuration can then be accessed by other script methods using Script.config.
Property Name | Return Type | Description |
---|---|---|
<configuration property> |
variant |
The properties of the ScriptConfig object are entirely determined by the script itself. In the OnInit method, assign the default values of any configuration properties you want to this object. The type of each default value controls the type of the property. The Preferences page only supports editing certain types of variables, so you must only assign properties of compatible types. Preferences supports:
|