Properties - definition

Some of the OpusScript functions will return a new object. The new object contains properties that are listed in the function’s Help page.

The properties for an object are listed in the Return Value section of the Help page.

To reference an object’s properties, use the following syntax:

ObjectName.PropertyName

For example:

Text_1.SetSelection(0,-1)
var TextStyle = Text_1.GetSelectionStyle()
var FontStyle = TextStyle.fontname

In this example, the first line of code selects all the text in a Text object named Text_1. The second line create a new object in the variable TextStyle. The last line of code stores the property fontname in a variable FontStyle.

Object syntax in Data Types

Close