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

Expressions

Macro statements mostly evaluate expression to read or modify data. Expressions can be used to assign variables, access object properties, call functions and do arithmetic, logical or comparison operations. They can also provide literal values.

// Literal values: strings, numeric values and booleans "String Literal" 1234 3.5 true // Variables $name $format // Assignment $i = 0 $i += 1 $x = true $x &&= false $s = "text" $s &= " more text" // Arithmetic (3 - 5) * 2 $x || $y // String concatenation ("text" & $str) & " more text" // Comparison 7 > 4 "text" != $x // Unary sign and logical not +3 -5 !$a // Ternary operator ?: ($x > 3) ? "yes" : "no" // Function Calls String_Split($str, ";") DialogBox_Create("message") // Property access GetCurrentPage().name $Section.color // Array index $names[0] $multi_dim_arr[0][1][2] $Section.pages[1]

A more complex expression can combine all of these simpler expressions:

"Last page in the section has " & ((String_Length($Section.pages[(Array_Length($Section.pages) - 1)].name) > 0) ? "a name" : "no name")

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