About Scripting

T-ANIMPA-007-001 & T-HSCP-001-001

Harmony provides you with several scripting interfaces to allow you to automate and streamline certain tasks as well as to add customs functionalities to the application. Those scripting interfaces use Qt Script, a scripting language based on the ECMAScript standard which is very similar to JavaScript.

Harmony has two different scripting interfaces:

  • Harmony Scripting is the main scripting interface. Among many possible uses, Harmony scripts can automate workflows and functionalities in Harmony, create dialogs and perform batch operations on a scene.
  • The Extended Scripting Interface is a suite of modules for power users. It includes modules for editing drawings, for creating tools and toolbars and for executing Python scripts.

Harmony Scripting Reference

This section of the documentation explains how to use the Harmony Script Editor, but does not teaches how to write scripts nor does it contain in-depth information about the classes and modules that are available in the Harmony scripting interface. The reference guides for each of the Harmony scripting interfaces are located on different documentation websites. These reference guides document all the modules and classes that are available in the Harmony scripting interfaces, as well as all of their methods and properties.

You can access the documentation for each of the scripting interfaces using the links below:

TIP The scripting reference guides are also packaged with Harmony, so you can access them even if you have no Internet connection. To access them, open the Help menu at the top of the Harmony user interface and select either Scripting Interface Documentation or Extended Scripting Interface Documentation.

About Qt Script

Qt Script is an object-oriented scripting language based on the ECMAScript standard, like JavaScript and JScript. However, there are some differences that distinguish Qt Script from these other scripting languages, which are familiar to web programmers.

The Qt Script environment provides several standard classes and modules that are not documented in the Harmony scripting documentation. For a reference of the QT development environment, refer to the Qt Documentation website.

For a tutorial on writing JavaScript, refer to the JavaScript Tutorial section of W3Schools.


As of Toon Boom Harmony 10.3, Toon Boom Animation has changed its scripting language from QSA script to Qt Script. Scripts are stored in plain text in files with the .js extension, instead of .qsa. This change to the API improves the software and gives access to 64-bit capabilities of the scripting interface.

Eery effort was made to ensure backward compatibility with QSA scripts. Hence, simple functions can be ported without making any changes, but class definitions must conform to the Qt Script syntax. Therefore, scripts that define classes must be updated. For detailed instructions on how to update from QSA to Qt scripts, see the Moving from QSA to Qt Script documentation of the Qt website.