v1.2.0.1-beta1
|
This is an example of collecting (accumulating) lines of text from a State or Value.
When the state/value changes, the new text is sent to this script. It stores the last few lines and sends them back as a new State. The number of stored lines can be specified as a parameter to the append()
function.
This particular example is tailored to collecting script errors from this plugin itself. It could be used as in the included Touch Portal button.
As described in Status and Logging, every time an unhandled script error is detected the plugin updates the Last script instance error State with the error message. A Touch Portal event handler detects the change and sends that line of text to this script. The script optionally also color-codes some parts of the error message; the error number, time stamp, and instance name.