The OpusScript Language

OpusScript is based on a JavaScript standard produced by the European Computer Manufacturers Association (ECMA) commonly known as ECMAScript or ECMA-262.

ECMA-262 is equivalent to JavaScript version 1.1. In other words, programming with OpusScript is like programming with JavaScript version 1.1 but obviously it has been extended with commands and functions specific to Opus publication objects.

For more information, we recommend you either purchase a book on JavaScript or run a search on the web for ‘JavaScript Tutorials’.

Note:
In common with most programming and scripting languages, and in order to maintain compatibility with the ECMA-262 Standard, OpusScript is case sensitive.

This means that ‘calculateTax’ is not the same as ‘CalculateTAX’.Although this allows you to have, for example a function named ‘CalculateTax’ and a variable named ‘CalculateTAX’, we strongly advise that you do not rely on capitalisation to distinguish between functions and variables. This is particularly critical if you use an object with a similar name as this will cause confusion which is difficult to identify.

As you start to use the language you may often need reminding how a particular element is capitalized so we have provided a comprehensive Script Reference List as an aide memoire – see more information below. Please note, that Opus will auto-correct OpusScript function names when you type them in the Script Editor.

Related Topics:

Overview of OpusScript Reference Lists

Where do I write my OpusScript?