Script Editor Toolbar

The Script Editor toolbar gives you quick access to some commonly used commands for editing and testing scripts in the Script Editor view—see Script Editor View.

Icon Button Description
New Script

Creates a new script. When you click on this button, you are first prompted to type in a name for the script. Then, you will be prompted to select which location to save the script in:

  • User: Saves the script to a directory in your user preferences directory. You will be able to run and edit the script from any scene as long as you are logged in as the same user.

  • Scene: Save the script to the scene's scripts sub-folder. Anyone will be able to edit and run the script when working on this specific scene.
  • System Variable: Save the script to the directory in the TOONBOOM_GLOBAL_SCRIPT_LOCATION environment variable. This option is only available if this environment variable is set.
NOTE For more information on script locations, see Script list.

Import Script

Allows you to import a script from your machine into Harmony. When you click on this button, you are prompted to browse for and select a script on your file system. Then, you are prompted to select which location to import the script in:

  • User: Saves the script to a directory in your user preferences directory. You will be able to run and edit the script from any scene as long as you are logged in as the same user.

  • Scene: Save the script to the scene's scripts sub-folder. Anyone will be able to edit and run the script when working on this specific scene.
  • System Variable: Save the script to the directory in the TOONBOOM_GLOBAL_SCRIPT_LOCATION environment variable. This option is only available if this environment variable is set.
NOTES
  • When you import a script, any user interface (.ui) or icon (.png) file that is in the same directory and has the same filename as the script will also be imported.
  • For more information on script locations, see Script Editor View.
Delete Script

Deletes the selected script.

NOTES
  • You cannot delete a script if it is in the Application Resources location, as those are scripts that are installed with Harmony.
  • If you delete a script that was originally in Application Resources but which you copied to another location so you could make changes to it, the original version of the script in the Application Resources folder will be restored to the list.
Refresh Script File List

Refresh the list of scripts in the Script Editor. If there are new scripts in your user preferences or your scene's scripts sub-folder, click on this button to be able to open them in the Script Editor.

Set External Editor

Allows you to type in the path and name for your preferred text editing software.

NOTES
  • On macOS, only typing the name of your preferred text editing software is enough if that application supports the AppleScript Open Document protocol.
  • On Windows, unless your text editor is in your system's PATH environment variable, you will have to type in the full path to the editor.
Open with External Editor

Opens the selected script in the chosen external text editing software.

Set Target

Prompts you to select which script and which function to use with the Run and Debug buttons.

NOTES
  • You can set the entire script as the target by selecting the <Nothing> function from the functions list.
  • You cannot link an entire script to a toolbar button. Only functions within scripts can be added as toolbar buttons. Therefore, running or debugging an entire script rather than one of its functions should be done for testing purposes only.
Run

Runs the target script and function.

NOTES
  • If you have not set a target script and function, you will be prompted to set one when you click on this button.
  • You can set or change the target script and function by clicking on the Set Target button.
  • If you are editing <<<Sandbox>>>, this button will simply run what you typed into the sandbox, regardless of whether another target is set.
Debug

Open the target script and function in the Qt Script Debugger, in which you can test and debug the function.

NOTES
  • If you have not set a target script and function, you will be prompted to set one when click on this button.
  • You can set or change the target script and function by clicking on the Set Target button.
  • If you are editing <<<Sandbox>>>, this button will simply debug what you typed into the sandbox, regardless of whether another target is set.
Stop Execution

If a script is currently running, this interrupts its execution.