Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Find and Replace Goes Blind

1 view
Skip to first unread message

Ron Hirsch

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
My first thought is that the [HRt] you're using was just typed in, which
of course would never work. But since you say that it works some of the
time, it would seem that that isn't the case.

Just to confirm, if you position the cursor after the "]" in [HRt], and
then arrow left one time, does the cursor jump to the beginning of the
[HRt], or just to the other side of the "]"?

If it jumps to the beginning, then it is indeed the code for the hard
return. If not, then it is not the code, but just a character string which
won't work.

Ron Hirsch
+++++++++++++++++++++++++++++++++++++++++++
AAW wrote:

> Hi All,
>
> This a weird one. And I really hope I'm just missing something simple
> and obvious.
>
> I'm finding that WordPerfect's Find & Replace function won't always
> recognize valid target strings, even when they are definitely there
> and all settings in the dialog box are correct. This has apparently
> been going on for a long time and I've been assuming that either I was
> making some simple mistake or WP was just poorly designed in this
> area.
>
> SYSTEM INFO:
> 266Mhz PentiumII with 64MB RAM (standalone); Windows 95 OSR 2.5 with
> all updates, including DUN 1.3, WinSock 2, DCOM95, and Library Update;
> WordPerfect Suite 8 (build 8.0.0.611)
>
> SPECIFIC EXAMPLES:
> 1) I found out a couple of days ago that WP macro variables could
> contain codes as well as text. They'd never worked like that on my
> machine (possibly because of an earlier occurrence of this problem
> plus insufficient research on my part). To verify the information, I
> tried the following macro on a test document consisting of several
> triplets of hard returns separated by single letters.
>
> vCODE:="[HRt][HRt][HRt]"
> PosDocTop ()
> OnNotFound (END)
> SearchString (StrgToLookFor: vCODE)
> ReplaceString (RplcStrg: "")
> ReplaceForward (SearchMode: Regular!)
> Label (END)
>
> I ran it twice and - in line with my earlier experiences - it didn't
> work (i.e., made no changes to the document). To be sure I wasn't
> making some simple mistake in the code, I edited a copy of the macro,
> replacing the variable in the search string with three hard returns.
> That worked. So I UNDO'd the test document and tried the original
> macro one more time; suddenly it worked, too.
>
> 2) A few days later, I started having trouble with a simple macro that
> removes hard returns and excess spaces from a block of preselected
> text. I've used it dozens of times with no problem. Suddenly, it began
> to either hang (infinite loop) or end with a not found at the first
> command (PosSelectTop). I exited WP then restarted my machine. The
> macro worked perfectly (even on the text it first hung up on).
>
> 3) I tried a third macro, which copies and pastes text between two
> different documents. It's a work in progress and I'd put it aside
> because it kept ending with a not found for a BookmarkFind command. I
> couldn't figure out why; the bookmark did exist and the insertion
> point was actually being placed there. After I'd restarted my machine
> (see #2), I went back and tried the macro again. This time it worked.
>
> GENERAL COMMENTS:
> This erratic behavior isn't limited to macros (but all the macros
> affected use Find & Replace). I've had similar situations while using
> Find & Replace manually. It will occasionally return a not found
> message even when the search target is definitely there (and the
> Actions, Options, insertion point, and so on have been checked and
> double-checked). Another possible symptom is Find & Replace's tendency
> to ignore the first occurrence of a target string during a "Replace
> All." When I first noticed that, it happened so often I thought WP was
> designed to work that way. (Guess I owe the Corel programmers an
> apology for all those nasty thoughts I directed their way. <g>)
>
> Seriously, though, if anyone has any ideas on this, I would deeply
> appreciate it. Now that I've finally realized it's a bug and not a
> feature, it's driving me nuts.
>
> Thanks,
> Arn


Cliff Head

unread,
Feb 15, 1999, 3:00:00 AM2/15/99
to
Your macro works. I cut and pasted it, replaced the "[HRt]s" with [HRt]
codes (you did type those into your mail message just for visual purposes,
right?), and ran it under the conditions you described. No problems here.
Add this line: SearchFindWholeWordsOnly (State:No!) and see if that fixes
it for you. A "code" search will not work if you've got the whole word
option selected.


AAW wrote in message <36c8c074...@cnews.corel.ca>...

AAW

unread,
Feb 16, 1999, 3:00:00 AM2/16/99
to

AAW

unread,
Feb 16, 1999, 3:00:00 AM2/16/99
to
Thanks to both Cliff and Ron for their fast responses.

Regarding the code inserter - yes, I use both command and code
inserter as much as possible, just to cut down on typos. The HRt's in
question show up as MacroFunc in Reveal Codes.

I'll go back and edit my various macros to include the whole words off
statement. This has been an intermittent problem (shows up only when
most inconvenient), so it may take a while to post back results.

Again, many thanks to both of you.

Regards,
Arn

On Mon, 15 Feb 1999 21:25:16 -0500, "Cliff Head"
<headc@mail*DOAS*State*GA*US> wrote:

>Your macro works. I cut and pasted it, replaced the "[HRt]s" with [HRt]
>codes (you did type those into your mail message just for visual purposes,
>right?), and ran it under the conditions you described. No problems here.
>Add this line: SearchFindWholeWordsOnly (State:No!) and see if that fixes
>it for you. A "code" search will not work if you've got the whole word
>option selected.
>
>
>AAW wrote in message <36c8c074...@cnews.corel.ca>...

GLKumpf

unread,
Feb 16, 1999, 3:00:00 AM2/16/99
to

In article <36c8c074...@cnews.corel.ca>, arn...@noexecspampc.com (AAW)
writes:

>1) I found out a couple of days ago that WP macro variables could
>contain codes as well as text. They'd never worked like that on my
>machine (possibly because of an earlier occurrence of this problem
>plus insufficient research on my part). To verify the information, I
>tried the following macro on a test document consisting of several
>triplets of hard returns separated by single letters.

In a macro, before you enter a SearchString or ReplaceString code, you should
always initialize all the search parameters

SearchString("")
ReplaceString("")
MatchPositionAfter()
SearchFindWholeWordsOnly(No!)
MatchWithAttributes(No!)
ReplaceWithAttributes(No!)
SearchCaseSensitive(No!)
ReplaceWithCase(No!)
MatchWithFont(No!)
ReplaceWithFont(No!)
MatchWithFontSize(No!)
ReplaceWithFontSize(No!)
SearchInSelection(No!)
SearchWordForms(No!)
SearchWrap(No!)
MatchLimit(No!)

Some people like to put the initialization codes in a Procedure, Function, or
loop back Label and call them each time before entering a search command. But
just putting them at the top of a macro is generally sufficient to avoid the
erratic search behavior you describe.


Gerald L. Kumpf glk...@aol.com
WordPerfect Consultant & Custom Macro Programmer
Winner in 1997 and 1998 Corel World Design Contests
Business Applications, Macros Division

Ian Kingston

unread,
Feb 16, 1999, 3:00:00 AM2/16/99
to
AAW wrote:

> I'm finding that WordPerfect's Find & Replace function won't always
> recognize valid target strings, even when they are definitely there
> and all settings in the dialog box are correct. This has apparently
> been going on for a long time and I've been assuming that either I was
> making some simple mistake or WP was just poorly designed in this
> area.

Are you using the 'Limit Find Within Selection' option? I've noticed
that after using this feature an attempt to repeat the Find operation
will fail if the Find and Replace dialog is left open (or the 'Limit
Find Within Selection' option not deselected). This is logical - there's
still an active selection, which you can't see, and the insertion point
is at the end of the selection.

I don't know how that would interact with a macro, but it might be
relevant.

--
Ian Kingston | The Electric Editors
i...@ikingston.demon.co.uk | Resources for professional editors
www.ikingston.demon.co.uk | www.ikingston.demon.co.uk/ee/

LV

unread,
Feb 16, 1999, 3:00:00 AM2/16/99
to
FWIW, I've experienced the exact same thing - intermittently - and am
certain all weird search options are deselected. I think I usually "fix" it
by closing and restarting WP8.

LV

AAW wrote in message <36c8c074...@cnews.corel.ca>...
>Hi All,
>
>This a weird one. And I really hope I'm just missing something simple
>and obvious.
>

>I'm finding that WordPerfect's Find & Replace function won't always
>recognize valid target strings, even when they are definitely there
>and all settings in the dialog box are correct. This has apparently
>been going on for a long time and I've been assuming that either I was
>making some simple mistake or WP was just poorly designed in this
>area.
>

>SYSTEM INFO:
>266Mhz PentiumII with 64MB RAM (standalone); Windows 95 OSR 2.5 with
>all updates, including DUN 1.3, WinSock 2, DCOM95, and Library Update;
>WordPerfect Suite 8 (build 8.0.0.611)
>
>SPECIFIC EXAMPLES:

>1) I found out a couple of days ago that WP macro variables could
>contain codes as well as text. They'd never worked like that on my
>machine (possibly because of an earlier occurrence of this problem
>plus insufficient research on my part). To verify the information, I
>tried the following macro on a test document consisting of several
>triplets of hard returns separated by single letters.
>

AAW

unread,
Feb 17, 1999, 3:00:00 AM2/17/99
to
Hi Everyone,

Thanks for all the responses.

I think Gerald Kumpf hit it on the head. I ran the unmodified macros
with Match | Whole Words checked in the F&R dialog box (adaptation of
Cliff Head's suggestion) and was able to duplicate some but not all of
my problems. I take that to mean there were probably some other
leftover settings and whatnot involved. Gerald's suggestion will start
me clean every time.

Thanks again,
Arn

On Tue, 16 Feb 1999 00:48:54 GMT, arn...@noexecspampc.com (AAW)
wrote:

Gabrielle R. Dowling

unread,
Feb 20, 1999, 3:00:00 AM2/20/99
to
I have bumped into this as well, and can't produce it much less
reproduce it (and I've spent hours trying), nor have users who have
reported the problem in any way consistently experienced the problem. I
do think there has to be some intervening factor, though, since certain
users experience the problem semi-frequently, and others never have it,
and this applies against a range of models of PCs so I don't think it's
hardware specific...

Best,

Gaby

LV wrote:
>
> FWIW, I've experienced the exact same thing - intermittently - and am
> certain all weird search options are deselected. I think I usually "fix" it
> by closing and restarting WP8.
>
> LV
>
> AAW wrote in message <36c8c074...@cnews.corel.ca>...

0 new messages