About Scripting


The Harmony Scripting guide contains information to help you use Qt Script, the scripting language used by Toon Boom Harmony.

Qt Script provides access to many of the functions supported in the Harmony interface. With Qt Script, you can automate a number of Harmony functions to speed up the completion of various repetitive tasks.

Harmony has two different scripting interfaces:

  • Harmony Scripts are scripts that you can write and use directly in the Harmony user interface. Among many possible uses, Harmony scripts can automate workflows and functionalities in Harmony, create dialogs and perform batch operations on a scene.
  • Control Center Scripts are scripts than can be launched in a command line interface via the Control Center application. They can be used to perform operations on the different elements of a Harmony Server database.

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. For a reference on how to write Qt Scripts for the Harmony scripting interfaces, see Scripting Reference.

NOTE For a reference of the QT development environment, refer to the Qt Documentation website.
NOTE 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 for a better and faster scripting environment. Qt Script is very similar to JavaScript. 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.

To avoid complications for users of earlier version, every effort was made to enable backward compatibility with QSA scripts. Simple functions can be ported without making any changes. However, 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.