Editor
The Editor view allows you to manage all your scripts that can be used in Actions.
To create an Editor view, check the Layout organization section.
Scripts
Kratos Scripts are written in javaScript.
Naostage has a collection of tested and proven Scripts corresponding to a large panel of use cases and third-party systems that we are constantly updating and expanding. But you can of course write you own Scripts to create any custom interaction with any third party system possible.
You can find the latest Script library on the Naostage website.
Scripts are show based. A new show has no pre-filled scripts and you need a Script to create an Action. That is why we recommend to always keep the Script library we provide at your disposal.
Precautions to take when modifying a Script
If you make a modification to a script that leads to an error, all Actions using this script will have their parameters reinitialized. We suggest to create a new script instead of modifying an existing one if you are not sure of the consequences of your modifications.
General controls
Name | Description | Image |
---|---|---|
Script list | At the left of the view is the list of all the Scripts of the show. | |
Create Script button | At the bottom of the Script list, this button allows you to create a new Script. | |
Deleted Script button | At the top right of the view, the trash icon allows you to delete the selected Script. | |
Import Sript(s) button | You can import a script (or multiple scripts at the same time) from any location using the appropriated button located at the top right of the view. The name, category and description fields are automatically filled in during an import if the script format is respected in the imported file. The validity of the script isn't checked when imported, and duplicates are not checked either at the moment. |
|
Code editor window | Page where you can edit the script's code and run the scripts. | |
Configuration tab | The configuration tab allows you to:
|
|
Preview tab | The preview tab allows you to see what an Action using the Script will look like. To see the Preview, you have to run the Script (see the run a script section). | |
Console tab | The console tab allows you to see the console output of the script when it runs. It is useful to debug your script. |
Run a script
To test a script without creating an Action, you can run it in the Editor view. Some controls are present at the top right of the code editor window.
When you run a script, Kratos will create a virtual Action using the script and run it.
If you select a module in the preview tab you will be able to send and receive information via this module. This virtual Action will be deleted once you pause the script or when you leave the page containing the Editor (even if you don't pause the script).