Find/replace expressions – Nisus Writer Pro User Manual

Page 320

Advertising
background image

300

Using Normal Find

Finding and Replacing Text

Creating a macro from a set of Find, Replace and or Find/Replace expressions

Nisus Writer Pro can automatically create a macro out of any find or find/replace expression you
build in the Find/Replace window. (For an explanation of macros see “Macros, Skimming the
Surface” and “
Macros, the Deeper Workings” on pages 397 and 401 respectively.) All you need do is
choose the menu command Gear > Macroize… in the Find/Replace window. Nisus Writer Pro takes
all the information you have set there and builds expression for your macros. This allows you to
test your find/replace expression thoroughly before adding a line to your macro.

1. Test your find/replace expression. Be sure that the settings in the Find/Replace window are set

appropriately.

The Macroize… command takes these settings as the “options” argument in the macro. (For
more information see “The list of find options” on page 409.)

2. Choose the menu command Gear > Macroize… inside the Find/Replace window.

A sheet appears in the Find/Replace window that offers a variety of choices.

Figure 329

The Macroize sheet in the Find/Replace window

From the pop-up menu inside the sheet you can choose from a number of options.

3. Choose the appropriate options for your macro command.

Find Next

Finds and selects the next occurrence of the “Find what” expression.

Find Previous

Finds and selects the previous occurrence of the “Find what”
expression.

Find All

Finds all occurrences of the “Find what” expression and selects
them as a multipart selection.

Replace Next

Finds the next occurrence of the “Find what” expression and
replaces it with the “Replace with” expression.

Replace Previous

Finds the previous occurrence of the “Find what” expression and
replaces it with the “Replace with” expression.

Replace All

Finds and replaces all occurrences of the “Find what” expression
and with the “Replace with” expression.

Once you have made your choice you can either save those settings to create a one-line macro
or copy the settings to the Clipboard to either edit or add to an existing macro.

4. Click Save as Macro….

Nisus Writer Pro presents a variant of the Save as dialog set to the Macros folder. The name of
the file begins with the kind of action you chose in 3 above followed by the first few characters
of the “Find what” expression in the Save as: field.
Or…

5. Click Copy to Clipboard to put the same information on the current Clipboard so that you can

paste it into whatever macro you’re working on. This is for advanced users.

Or…

6. If you decide not to proceed, click Cancel.

!

An example of using PowerFind and Macroize is detailed in the section “Convert Styles to HTML Code”
beginning on page 315.

Advertising