Reply to topic  [ 1 post ] 
Perl Macro problem 
Author Message

Joined: 2004-08-03 03:43:44
Posts: 2
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
s/"a"/"b"/g;

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.


2004-08-12 04:02:20
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software