🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: uw.wordperfect.users
2 messages
2 total messages Started by Michael's Music Service Wed, 08 May 1996 00:00
Duplicate Search macro
#13
Author: Michael's Music Service
Date: Wed, 08 May 1996 00:00
18 lines
1296 bytes
I have a huge document with 10000 single-line sentences.  They are in 
alpha order.  I want to write a macro that will read the first few words 
of line1, store it, read line2, compare it, and delete line2 if they're 
the same. Well, really, it'll just stop there and give me the chance to 
edit or delete.
 
I can't figure out how to read the stuff into a variable. I thought maybe 
Search, but nothing seems to work.  Ideas, anyone?

--
Cheers!
Michael
--
MICHAEL'S MUSIC SERVICE | CIS: 70731,3403 |---| Organ Music Our Specialty
4146 Sheridan Drive     | ambrose@mercury.interpath.com |----| John Apple
Charlotte, NC 28205-5654| (704) 567-1066 |-------------| Michael Johnston
Christ Episcopal Church |---| St. Gabriel's RC Church |--| Temple Beth-El
Re: Duplicate Search macro
#14
Author: Jordan Hodgson
Date: Thu, 09 May 1996 00:00
34 lines
1582 bytes
This can almost certainly be done, but the implementation
will depend on which version of WP you're using. It makes
all the difference. I'm constantly amazed at how many
visitors to these forums fail to understand that there are
at least 3 distinct and mutually exclusive species of WP
in widespread use.

Generically the procedure will be:

1. Assume the macro will commence operation at the start
   of a line.

2. Turn on Blocking.

3. Do Ctrl-Right Arrow a number of times = number of words
   you want to read.

4. Assign the blocked text to a variable.

5. Move to start of next line.

6. Repeat the block, movement, assign steps, assigning to
   a different variable name.

7. IF test for equality of the 2 variables.

8. If they're the same, have the macro execute an action,
   or have it stop as your posting implies.

Just how you'll assign the block to a variable brings us
back to my opening point.

Dan Hodgson
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads