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

Comments

You can provide comments between macro statements to improve readability of your macros. Comments are inserted using Comment statements :

// Create a new dialog box $dialog_box = DialogBox_Create("") // Now add some controls DialogBox_AddTextBox($dialog_box, "&Find what", $Search, "", false) DialogBox_AddTextBox($dialog_box, "&Replace with", $Replace, "", true) $Options = Array("Current page", "Current section", "Current notebook") DialogBox_AddDropDown($dialog_box, "&Scope", $Scope, "Current section", $Options) DialogBox_AddCheckBox($dialog_box, "Match &case", $MatchCase, false) // Now show the dialog box DialogBox_Show($dialog_box)

This helps with visually separating statements. Comments can also be used to temporarily remove statements from macro execution by moving them under a comment (commenting-out):

// Create a new dialog box $dialog_box = DialogBox_Create("") // Now add some controls DialogBox_AddTextBox($dialog_box, "&Find what", $Search, "", false) DialogBox_AddTextBox($dialog_box, "&Replace with", $Replace, "", true) Expand// For now we don't have following controls: // $Options = Array("Current page", "Current section", "Current notebook") // DialogBox_AddDropDown($dialog_box, "&Scope", $Scope, "Current section", $Options) // DialogBox_AddCheckBox($dialog_box, "Match &case", $MatchCase, false) // Now show the dialog box DialogBox_Show($dialog_box)

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