Overwrite Settings Table to a Domain (xui.write)
Declaration
ok = xui.write(domain, settings)
Parameters
- domain
String. The defaults domain identifier used by the config UI. - settings
Table. Key-value pairs to write.
Returns
- ok
Boolean. true on success; false on failure.
Description
Use this function to write multiple settings at once; if the config UI is currently displayed, the displayed values are updated immediately.
This function does not validate value types. If you need to ensure value types are valid, callxui.setupafter writing to validate/correct.
See the config UI standard: XUI
Examples
xui.setup('interface.xui')
local dict = xui.read('com.yourcompany.A-Script-Bundle')
dict['enabled'] = true
xui.write('com.yourcompany.A-Script-Bundle', dict)
xui.setup('interface.xui')