Working with menu commands, Looping and accessing other macros, Call one macro from another – Nisus Writer Express User Manual

Page 268

Advertising
background image

248

Macros Quick & Easy

Figure 210

The unknown macro command alert

Menu commands sometimes have the same name but perform different actions and belong to
different menus. This only happens if you create menu commands (macros, file names, or window
names) that conflict with the standard commands (or with other macros). To resolve conflicts in a
macro, precede the command by the menu name followed by a colon. For example you may have a
macro that does something special when you copy selections and have named it Copy. In such a
case, writing Macro:Copy in your instructions will call that macro.

Working with Menu Commands

To use a menu command in a macro, simply type its name on a separate line. For example, the
macro instructions below selects all text in a document, changes the font to Lucida Grande, and the
style to bold
Select All
Lucida Grande
Bold
To include arguments in Menu Command macro instructions see “Macros, the Deeper Workings” on
page 249.

Looping and Accessing Other Macros

A macro can access any other macro in the Macros menu. Invoking one macro from within another
is like running any other menu command. Write the name of the macro to be invoked on its own
separate line in the macro performing the call.

Call one macro from another

A Nisus Writer Express macro can call any command on the menus of Nisus Writer Express. This
includes other macros and open files.

Write the macro name on its own line in the macro (UPPERCASE or lowercase is not significant
when writing a menu command’s name).

If your macro’s name conflicts with another menu command, write this command as
Macro:MacroName.

Advertising