NISUS Archives

August 2011

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Philip Spaelti <[log in to unmask]>
Reply To:
Date:
Mon, 8 Aug 2011 19:10:31 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
Bob, the problem (which is not obvious at all) is that your macro uses the double quotes. In NWP this causes interpolation, so the the "\." is turned into a '.' before the Find/Replace is executed, which as you might notice yourself is going to be a disaster for your macro. If you replace the double quotes with single quotes that should solve the problem.

best
Philip

PS: I can't remember the Classic syntax so well, so the role with interpolation may have changed. I can never remember this stuff myself, and always have to check.


On 7. Aug 2011, at 1:51 , Robert B Waltz wrote:

> I am trying to convert my old NisusWriter Classic macros, and going crazy in the process. I read the documentation, I look at Kino's help file on the new PowerFind Pro, and sometimes it helps -- and sometimes it doesn't.
> 
> I'm having terrible problems with treating literals as metacharacters, e.g. in a PowerFind Pro expression in a macro, "\." is treated as just plain "."
> 
> For example, I want to turn any instance of two or more periods followed by zero or more spaces to an ellipsis "Š"
> 
> The way I read the documentation, the following line should work:
> 
> Find and Replace "\.\.+ *","Š","Ea"
> 
> That is, take a literal period, followed by one or more additional literal periods, followed by spaces, and convert it to an ellipsis.
> 
> Instead of doing that, it converts entire documents into an ellipsis, as if the command were
> 
> Find and Replace ".","Š","Ea"
> 
> I have several other problems of this type, but I would imagine I can solve them all if I can solve this one. What am I missing?
> 
> And I KNOW I'm missing something stupid, so you don't need to point it out. :-)

Philip Spaelti
[log in to unmask]

ATOM RSS1 RSS2