Tutorial

Getting Started with Macros

Macro Editor

User Interface

Editing Macro Statements

Expression Editor

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Sorting objects

Macro Logging

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Operators

Macro expressions can contain several different operators. They can be used for assignments, comparisons, arithmetic or logical operations and string concatenations. Following is a list of all the operators. Operators can be operating on one (unary), two (binary) or three (ternary) sub expressions:

Arithmetic Operators

OperatorNameType
+Additionbinary
-Subtractionbinary
*Multiplicationbinary
/Divisionbinary
%Modulobinary
-Unary Minusunary
+Unary Plusunary

Assignment Operators

OperatorNameType
=Assignmentbinary
+=Addition Assignmentbinary
-=Subtraction Assignmentbinary
*=Multiplication Assignmentbinary
/=Division Assignmentbinary
%=Modulo Assignmentbinary
&&=Logical And Assignmentbinary
||=Logical Or Assignmentbinary
&=Concatenation Assignmentbinary

Comparison Operators

OperatorNameType
==Equalsbinary
!=Not Equalsbinary
<Less Thanbinary
<=Less Than or Equalsbinary
>Greater Thanbinary
>=Greater Than or Equalsbinary

Logical Operators

OperatorNameType
&&Logical Andbinary
||Logical Orbinary
!Logical Notunary

String Concatenation Operator

OperatorNameType
&Concatenationbinary

Ternary Operator

OperatorNameType
?:Ternary Operatorternary

Operator Precedence

In macro expressions, order of evaluation for operators is always left to right. There is no precedence of any operator to another. For instance the expression 2 + 3 * 4 evaluates to 20 (first 2 + 3 = 5, then 5 * 4 = 20). The order of operations can be changed by providing parantheses: 2 + (3 * 4) will evaluate to 24. The Expression Editor automatically fully paranthesizes any expression so that this is obvious. If you type 2 + 3 * 4 / 5 to Expression Editor it will automatically parse and convert it to ((2 + 3) * 4) / 5.

Reference

Statements

ForEach

If

Else

While

Expression

Comment

Break

Continue

Hierarchy Objects

NotebookRoot

Notebook

SectionGroup

Section

Page

Page Objects

Title

Outline

Table

Column

Row

Cell

Paragraph

Text

Image

EmbeddedFile

Tag

Other Objects

DialogBox

Functions

Array Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Object Functions

String Functions