Skip to main content

# Script UI Editor

The Script UI Editor creates a parameter form that appears before a script runs. After saving the form, users can select the script on the main screen, click `Configure`, fill in parameters, and then run the script.

## Open from the Script Directory​

Supported flat script folders and `.xpp` package folders show `Edit Script UI Configuration`. If the item is not in the context menu, confirm that the script is in `Script Directory` and uses a structure the control center can recognize.

Typical workflow:

1. In `File Manager → Script Directory`, right-click a flat script folder or `.xpp` package folder.
2. Choose `Edit Script UI Configuration`.
3. Add inputs, toggles, dropdowns, checkbox groups, and other items from the form item list.
4. Select items in the preview area and adjust their order.
5. Edit labels, default values, options, and other properties in the property area.
6. Preview the form and click `Save`.

After saving, return to the main screen and select that script in the script picker. If the configuration is valid, a `Configure` button appears next to the script picker. Click `Configure`, fill in parameters, and then run the script. Flat scripts save to `lua/scripts/main.json`; `.xpp` packages save to root `main.json`.

If the `Configure` button does not appear, the script may not be selected, the configuration may not have been saved, or the form configuration may be invalid.

## Open from the Text Editor​

You can also open the Script UI Editor from a project in the Text Editor:

1. Find `main.json` in the project tree.
2. Right-click it and choose `Edit Script UI Configuration`.
3. Save the form, then continue editing or testing the script in the Text Editor.

This is convenient when editing script code and adjusting its run-time parameter form together.

If the same script needs different parameters for different groups, combine this with the group-specific script configuration described in Group Management.

## Choose Form Items​

- `Text`: show instructions or section labels. The user does not enter a value.
- `Input`: collect text such as account names, paths, keywords, or counts.
- `Toggle`: turn an option on or off.
- `Dropdown`: choose one value from many options.
- `Radio Group`: choose one value from a small set of mutually exclusive options.
- `Checkbox Group`: allow multiple options to be selected at the same time.

Dropdowns, radio groups, and checkbox groups need option lists. When setting defaults, follow the hint in the UI for option indexes. If you are not sure, leave the default empty, save the form, and open `Configure` to check the result.