WayScript allows you to write code to augment any script.
In a module with a code editor, click the "Edit Code" button to open the full-screen editor.
The "Edit Code" button appears when you hover over a code box.
Once opened, you will see your module settings, a File Browser, and a window for editing your code.
Just like most inputs in WayScript, code editors allow you to drag variables directly into your code.
Each code editor, has its own local file, called "scratch," and shares any global files throughout your script with any other steps of the same type.
To work with files, open the "File Browser". You can add new global files for easy access throughout your script. You also use the File Browser to select the file that you would like this module to run.
The File Browser allows you to create new files, switch between files, or edit the name of an existing file.
When a step is triggered, or when you press the "Run Code" button, the active file in the editor, indicated by the green dot, will be the one that runs.
Importing Code from Other Files