# ScriptConfig

The **ScriptConfig** object is accessed via the [**ScriptInitData**](scriptinitdata)**.config** and the [**Script**](script)**.config** properties. The [**ScriptInitData**](scriptinitdata)**.config** property allows a script (in its [**OnInit**](../scripting_events/oninit) method) to specify what configuration properties it supports, and provide default values for them. The properties assigned in [**OnInit**](../scripting_events/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**](script)**.config**.

| Property Name             | Return Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \<configuration property> | _variant_   | <p>The properties of the <strong>ScriptConfig</strong> object are entirely determined by the script itself.</p><p>In the <strong>OnInit</strong> 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.</p><p>The Preferences page only supports editing certain types of variables, so you must only assign properties of compatible types. Preferences supports:</p><ul><li>Boolean options (<strong>True</strong> or <strong>False</strong>) - the variable type must be <em>bool</em></li><li>Numeric options - the variable type must be <em>int</em></li><li>String options - the variable type must be <em>string</em></li><li>Multi-line string options - the variable type must be string and must contain at least one <em>CR/LF</em> pair. Note that a trailing <em>CR/LF</em> will be removed from the default value.</li><li>Multiple string options - the variable type must be a <a href="vector"><strong>Vector</strong></a> of <em>strings</em></li><li>Drop-down list - the variable type must be a <a href="vector"><strong>Vector</strong></a> with an <em>int</em> as the first element (to specify the default selection), and strings for the remaining elements.</li></ul> |
