Script Management
Import Scripts into the Control Center
- Open
File Manager → Script Directory. - Drag local script files, script folders, or full flat-script folders into the file manager.
- Uploaded scripts automatically appear in the main script picker and can be selected right away.
- If you have many scripts, you can create folders in
Script Directoryto organize them.
What Is a Flat Script?
The most convenient script format for the control center is a flat script, which is a folder containing lua/scripts/main.lua or lua/scripts/main.xxt. For example:
My Script/
├── res/
│ ├── icon.png
│ └── sample.png
└── lua/
├── helper.lua
└── scripts/
├── main.lua
└── main.json
When you upload this kind of folder, the control center treats it as one runnable script package. When deployed to a device, the folder is expanded by path, and main.lua or main.xxt is used as the entry point.
Launching and Stopping Scripts
- Select a script in the main script picker.
- Select one or more target devices in the device list.
- Click Launch Script on the action bar. The control center uploads the script to each device and starts it.
- If needed, use Stop Script on the same action bar.
If selected groups already have default scripts bound, those group scripts take priority over the script currently chosen on the action bar. See Group Management for the full rule set.
Upload Script to Devices / Select Script on Devices
- Upload script to devices: sends a selected script, or all local scripts, to devices without starting them.
- Select script on devices: changes the currently selected script on the device side without starting it.
Add a Configuration UI to a Script
- In
File Manager → Script Directory, right-click a flat script folder. - Choose
Edit Script UI Configuration. - Use the Script UI Editor to maintain
lua/scripts/main.json. - Back on the main screen, if the script has a configuration UI, a Configure button appears next to the script picker.
The same script can use its default main.json settings, and it can also keep separate group-specific settings.
Updating XXTLanControl.lua
- In
Settings → Script Run Settings, you can control whetherXXTLanControl.luais uploaded automatically before running scripts. - The same panel also provides an Update Now action to replace existing
XXTLanControl.luafiles inside flat scripts with the version bundled in the current control center.