Undoing a macro, Working with macro files, Before creating a macro – Nisus Writer Pro User Manual

Page 419: Typing menu commands, Create a new macro file, Save the current macro file under a different name, Case sensitivity in menu command dialect macros, A simple “to do” list, Macros

Advertising
background image

Customizing & Automating Solutions

399

Undoing a Macro

You can undo the effects of any macro, even the most complicated one, with a single Undo. Nisus
Writer Pro combines all the actions of a macro into a single Undo command. However, undoing a
macro won’t undo operations that are not undoable elsewhere in Nisus Writer Pro, such as closing
or saving a file.

Working with Macro Files

Macros are stored as Nisus Writer Pro documents and have their own icon. Loading a macro makes
Nisus Writer Pro aware of the macro file. It does not automatically open the macro window for
editing.
When you load a macro file, Nisus Writer Pro displays it as a command in the Macro menu.

Before Creating a Macro

Consider these basics before you create a macro

Determine the overall purpose of the macro. Do you plan to use the macro frequently? Or just
once? Will others find the macro useful?

Think of a descriptive name for the macro. Use names that correspond to the operation the
macro performs.

Macro names are not case sensitive.

When writing a macro, the menu items in Nisus Writer Pro should appear as they appear on the
menus. (Neither case nor ellipses (“…”) are significant.)

Typing Menu Commands

You can tell Nisus Writer Pro what to do just as you would type out a “to do” list for yourself.
Anything that Nisus Writer Pro can do by choosing a menu command with the mouse or trackpad
can be done in a macro by typing the name of that command.

Create a new macro file

The following instructions work for either a Perl script or a Nisus Writer Pro command language
macro.

1. Choose the menu command Macro > New Macro.
2. Write the instructions of your macro.
3. Choose the menu command Macro > Save As Macro….
4. In the Save As sheet that appears, notice that the location already points to your Macros folder

~/Library/Application Support/Nisus Writer/Macros
You can save the files elsewhere.

5. Choose Nisus Macro or Nisus Perl Macro from the File Format pop-up menu in the sheet and

click Save.

Save the current macro file under a different name

1. Press A as you choose a particular macro from the Macro menu to open the macro file for

editing (rather than running) the macro.

2. Choose the menu command File > Save As… to give the macro file a new name.

Case sensitivity in Menu Command Dialect macros

You do not need to be precise about using upper or lowercase characters because Nisus Writer Pro
pays no attention to them. If a menu command appears in a submenu, type only the command of
the submenu. You can ignore ellipses, but be sure to include any spaces in the command’s name.

A simple “to do” list

The two commands that follow, when put together in sequence as a macro will make UPPERCASE
all but the initial letters of every word in a selection no matter what the case of the characters was
before
To Capitalized
To Toggled Case

Advertising