# ScriptConfig

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/scriptconfig.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
