The scripts tab allows direct access to scripts.
Adding a New Script
To add a new script click the Add New Script button. This will open a form dialog. Enter the path and script name to be created. The script must have a .js extension.
Scripts are created relative to the root where the configuration is stored, the root of TB_HOME when exported.
Uploading a Script
Since TB.Connect 8.0 scripts can be uploaded from the computer into TB.Connect. To upload a script click the Upload Script button on the Scripts tab. This will present a form.
Enter a name for the script. This name will be relative to the configuration home in TBAHOME and so will be relative from the TBHOME root when exported. Add the full path where the script should be stored. If directories are included in the path they will be created.
Then select the script file from the computer, click the Upload button the file will be uploaded and the new entry added to the list of scripts.
JS and JSON files can be uploaded.
Editing a Script
To edit a script click the Edit button in the relevant script row.
This will open the script editor in a new window.
Deleting a Script
To delete scripts check the box beside each script that is to be deleted. Then click the Delete Selected button.
Deletion of scripts is final, there is no undo.
Importing a Script
If the configuration is related to one or more TB servers on the Servers screen then Import and Import All Scripts buttons are visible.
Clicking an Import button in a script row will open the standard import screen to select which server to import the script from. If the script is found in the TB_HOME of the selected server then it will be imported replacing the script in TB.Connect.
Clicking the Import All Scripts button will display the standard import screen to select which server to import scripts from. If any scripts are found in the TB_HOME of the selected server then they will be imported into TB.Connect.
If scripts that are already in TB.Connect are imported they will be overwritten. This is final with no undo.
Exporting a Script
If the configuration is related to one or more TB servers on the Servers screen then an Export Selected button is available on the scripts tab. To export one or more scripts check the box to the left of the script row(s) and click the Export Selected button. The standard export screen is displayed.
Scripts can also be exported from within the script editor.