Page 1 of 1

Perl Macro problem

Posted: 2004-08-12 04:02:20
by Paul Loeser
I think I posted this to the wrong group last week, so I am trying again.

Since I am quite new to Mac's (two months) and Nisus WE (two weeks), I still have no idea how to get the macros to work. I get a number of text files which have short lines, with a new line code after a few words. In the past, with a windows version of WordPerfect, I would run a macro which replaces two hard returns with a ~, replace all hard returns with nothing, and then replace ~ with two hard returns.

I can't get replace to work in a macro at all. It works fine in the regular "Replace All".

I have never been a programmer, so Perl is all new to me. I bought a book, but am still quite confused. I tried to write a simple macro to replace the letter a with the letter b. As best I can tell, the macro should be:

#Nisus Macro Block
#source front
#destination front replace
#Send Text as RTF
#End Nisus Macro Block

It does not work, and after playing with this and numerous variations for a few hours, I think I need the help of someone who actually knows what they are doing, unlike me. I'm sure there is something simple I am forgetting, but since I think the "#source front" tells the macro what document to use, "#destination front replace" where to send it, and a and b are not variables which need to be declared, I have no idea what I am doing wrong. Any assistance would be appreciated.