Macros, the deeper workings, The nisus writer express macro language – Nisus Writer Express User Manual

Page 269

Advertising
background image

Macros, the Deeper Workings

The Nisus Writer Express Macro Language

Writing macros is a form of programming.
The Nisus Writer Express macro language consists of various sets of instructions. Each individual
macro is made up of a list of these instructions that run in sequence (from top to bottom).
The simplest macros are made of Nisus Writer Express menu commands… the actual commands
you see in the menus as illustrated in “Working with Menu Commands” on 307. While most of these
standard menu commands do exactly, and only, what they do when you choose them individually
from the menus, some can accept “arguments” that extend their meaning and capabilities.
Additional instructions exist that enable you to assign “values” (or to use a non-technical term
“meanings”) to “variables”. Other instructions offer the ability to direct the macro to “branch off” in
different directions if certain conditions are met.
Each individual paragraph of a macro file represents one complete instruction.
Nisus Writer Express ignores any line in a macro that begins with the “#” character. You can use
these lines as comments to explain what the macro does. So, for example you might write the macro
in “Working with Menu Commands” on page 248 (of course you can put your comments either
before or after the command they deal with):

#Select the entire document.
Select All
#Apply the font Lucida Grande.
Lucida Grande
#Make it all bold.
Bold

Advertising