Scripting Interface |
The scripting interface in Storyboard Pro uses Qt Script to provide an efficient way to program tools and macros that can, among other things, be used to manipulate projects and automate tasks.
Scripts can be launched from a button in the Scripting toolbar, from the Script Editor as well as from a command line terminal.
Qt Script is based on the ECMAScript 3.0 standard. EMCAScript can be considered an extension of JavaScript. JavaScript documentation is widely available on the internet. The first 11 chapters (Part 1) of the book Eloquent JavaScript by Marijn Haverbeke which can be read online for free at http://eloquentjavascript.net/ are a great introduction to the subject.
Start by opening the Script Editor view. Then, select Sandbox from the scripts list. The sandbox is provided as a means to test out scripts without having to create or modify a script file. For example, try typing the following script:
Then, click on the Run button in the Script Editor toolbar, or open the Script Editor menu from the top-left corner and select Play/Debug > Run.
You can run a script on a Storyboard Pro project from the terminal, without opening Storyboard Pro first. This is referred to as running a script in batch mode. With the exception of the SelectionManager interface, all classes that are available in the Storyboard Pro scripting interface can be used in batch mode.
You can run a script in Storyboard Pro from a command line by using the following syntax: