How do I import an external script?

Updated on



This article outlines how to import scripts written in Javascript. If you want to work with Python, please see Python Script Console View and Toon Boom Harmony -- Python Interface.

Script guidelines

Before importing an external script, take note of the following:

  • The scripts intended for import must be in javascript (.js) format.
  • The external scripts cannot be contained in a zipped or compressed folder.
  • Custom icons can be created for external scripts to make them easier to recognize in Harmony’s Scripting toolbar.
  • A user interface (.ui) file, or icon (.png) file, will also automatically be imported when:
    • They are in the same folder as the script
    • They have the same filename as the script
  • You can set custom folders for saving scripts, see Storing in a Custom Folder.
  • Read more about scripting in Harmony, see About Scripting.

Step 1: Importing a script

  1. Open the Script Editor window by doing either of the following:
    • In the top-menu, select Windows > Script Editor.
    • In any view window, select the Add View button and choose Script Editor.
  2. The Script Editor view opens:

  1. To locate a script to import, do one of the following:
    • In the Script Editor toolbar, select the Import Script button.
    • In the top-left corner of the Script Editor view, click on the Menu button and select File > Import Script.

  1. A browser window will appear.
  2. Search the computer directory to locate the script and select the Open button to import it.
  3. The Save Script dialog box will appear:

  1. From the dropdown menu, choose one of the following options based on your version of Harmony:

Harmony Standalone Options:

  • User: The script is saved to a folder in your user preferences directory. You will be able to run and edit the script in any scene as long as you are logged in as the same user.
  • Scene: Saves 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.

Harmony Server Options: 

  • User: The script is saved to a folder in your user preferences directory. You will be able to run and edit the script in any scene as long as you are logged in as the same user.
  • Global: Saves the script to the Harmony database's global script directory. Anyone who is logged in to the database will be able to edit and run this script.
  • Environment: Saves the script to the current scene's environment. Anyone will be able to edit and run the script as long as they are working on a scene inside this environment.
  • Job: Saves the script to the current scene's job. Anyone will be able to edit and run the script as long as they are working on a scene inside this job.
  • Scene: Saves 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: Saves the script to the directory in the TOONBOOM_GLOBAL_SCRIPT_LOCATION environment variable. This option is only available if this environment variable is set.
  1. Repeat instructions 2 to 8 as many times as needed to import all your scripts.
TIP: Imported scripts can be added to the Scripting Toolbar. See How do I load and manage scripts? for more information.

Was this article helpful?

0 out of 0 found this helpful

Can't find what you are looking for?

Contact Us

Submit a request and we will get back to you as soon as possible.

Open a Support Ticket

Ask Our Discord Community

Get answers from our worldwide community of artists and animators.

Join Our Discord Server

Join the Conversations

Connect with us on social media for inspiration, updates, feedback and more.