nisus.com
https://www.nisus.com/forum/

Macro form of Find (and Replace) not illustrated in Manual
https://www.nisus.com/forum/viewtopic.php?f=17&t=5545
Page 1 of 1

Author:  Patrick J [ 2013-11-19 19:00:24 ]
Post subject:  Macro form of Find (and Replace) not illustrated in Manual

On page 409 of the manual it has this:

Find and replace
Find text, [options]
Finds and selects the given text. Options is a string, each letter turning on a separate feature.

This gives the impression that you just put the find string after Find and then the options in square brackets, like this:

Find Patrick, [r]

To mean Find the string "Patrick" going backwards through the document.

However you actually use single quotes like this:

Find 'Patrick', 'r'

I don't think that someone totally new to Nisus Writer would be able to work out how to do this from this section in the manual.

The example for Find and Replace has the same problem.

Author:  phspaelti [ 2013-11-20 04:26:31 ]
Post subject:  Re: Macro form of Find (and Replace) not illustrated in Manu

While I sort of see your point, the problem is no different from any other argument. Throughout the macro reference there are many arguments for many different commands, and they all work the same: you can specify them as explained in the Literals section, or you can pass them as variables.

In the case you specify you could do it like this:
Code:
$findExpression = 'Patrick'
$options = 'r'
Find $findExpression, $options

Since in this case I'm using variables, I don't need quotes. (Of course I need quotes, when I assign them to the variables instead.).
Also the brackets represent that the argument is optional.

In the end the Macro Reference is a reference, and so it's style is rather dense. A good introduction to writing macros still needs to be written (by somebody).

Author:  Patrick J [ 2013-11-20 14:57:22 ]
Post subject:  Re: Macro form of Find (and Replace) not illustrated in Manu

Thank you Philip, now I understand why it is the way it is.

I have just been looking through the manual for useful things rather than reading it in a sensible way.

I do think that using the Find/Replace commands in combination with the Menu Commands is really powerful and very simple.

In the old classic Nisus Writer manual I think the Find/Replace commands were included in the menu commands part and there was an illustration as to how to lay it out.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/