Main script
A Custom Component needs a main script when live values come from the script rather than from a DBC file, or when the script publishes extra tags beside the DBC signals.
Main Script is a service script in C#, Python, or Lua, and it keeps running until Disconnect or until the component shuts down.
Auto Start Main Script starts it when the profile loads, and with auto start left off the operator starts and stops it from Connect / Disconnect, which is a mainScriptToggle entry in actions.yaml.
Refer to Menu actions.
The script creates branches and leaves under the component in the tag tree, publishes with SetValue, ClearValue, and MarkStale, and the dashboard binds those paths directly.
On Disconnect the current values are cleared and marked stale, and the branches stay in place so the dashboard bindings remain valid.
Refer to Tags for the tag calls, and to Profinity Scripting for the service lifecycle.
The upload field is Main Script (Optional) on the Scripts tab. Refer to Custom Component files.