About the OTScript Files Editor

As an Administrator, you can define extra methods using editing commands.

See Also
About the Creation of Shortcut Methods
Coding in OTScript
Defining OTScript Methods in Templates

The OTScript Files editor is available from the OTScript Files tab of the Configure dialog box.



Toolbar
The toolbar provides the following commands for the methods of creation and modification:
New
Creates a file, which appears in the Files and Import Area. The default name is OTScriptx where x corresponds to the number of items in the list.
Define your code in the coding area .
Tip: Use Insert OTScript Method Example to start from a pattern.
Save
Checks the OTScript code and save changes if no error is detected.
Once the files are valid and saved, click Done. The new methods appear in the template editor.
Check Code
Checks the code of every file and displays error messages in the message area.
A bullet indicates the line containing an error.
Export
Exports the code of the OTScript files that you select from the File and Import Area.
A JSON backup file of your OTScript codes is created and downloaded by the navigator.
Insert OTScript Method Example
Inserts an OTScript method example in the coding area of the selected file.
Files and Import Area
Contains the OTScript filenames.
Manages the renaming of files and their removal.
  • To rename a file, double-click the name or click , edit the name, and then click .
  • To remove a file, click the next to the file. The file appears strikethrough until you click Save , at that moment the file is deleted.
  • To recover a file, click , the removed file reappears.
In the Drop Exported Library area, you can drop JSON files of OTScript backups to import corresponding OTScript files from your file explorer.
The code verification is automatically executed.
Note: If the .json file does not correspond to valid OTScript files, the import is not done.
Error Area
Marks indicate lines containing errors.
Coding Area
Define your OTScript code in this area.
Click Save , and then click Done to create the methods. If a method does not contain errors, the method can be added to the template editor.
The users can find extra methods in the Data tab of the template editor. If no category is indicated in the code, methods are presented in the Extensions category.
Message Area
Lists the errors detected during the verification.