Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: September 02, 2024
Also available as a single HTML file

Onetastic Macro Documentation > Concepts > Properties

Properties

Each object in macros have a set of properties. Some of these properties are read-only while most others are read/write. There are cases where some property may be write-only. For instance formatting properties like bold, italic etc. on Paragraphs are write-only as they can be set but cannot be determined since a paragraph can contain text with mixed formatting.

Properties are accessed with the property access operator (.) and they can be used to filter queries if you are looking for objects with certain property values (e.g. looking for a section with a given color):

foreach ($Section in GetCurrentNotebook().sections) if ($Section.color == "blue") $Section.color = "red"

They can also be used to sort objects (e.g. sorting pages by date):

SortObjects(GetCurrentSection().pages, "dateTime", false)

You can find the list of properties for each object in object documentation.

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions