[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Single-character search



Tim,

That's a great idea for a macro. I've always wanted XyWrite to do that the
way the Apple Pascal editor did.

Is this written for Xy 3.55 or Xy 4x, though?

I'm using 3.55. I tried to use it and got an error message, "You must have
a file open."

If I do use it, I'll have to examine the code and rewrite it myself. I
could never use a program that I didn't understand. That's the way you
*really* gain respect for programmers.

Norman

At 10:39 AM 1/27/99 EST, TBaehr@xxxxxxxx wrote:
>
>Here's a slightly more elaborate search routine that lets you search by
simply
>typing characters -- each character is appended to the search argument and
the
>search is re-run.
>There are a couple of extras here:
>Edit the search string by backspacing.
>Repeat the search on the current string by pressing the down arrow.
>Reverse the direction of the search by using the up and down arrows.
>Jump to the first instance of the current search string in the file.
>Toggle case-sensitivity on by pressing the Shift key by itself at the
start of
>the search.
>Search argument is saved and presented next time. Also appears in Menus
search
>routine (Save/Get 1840).
>
>Code could be added to operate on the target string: delete, copy to
>clipboard, etc. But that could defeat the search strategy: get to the target
>string with the fewest keystrokes. In most documents, you'll find your target
>within 4 to 5 keystrokes, but the search argument (of course) will contain
>only those keystrokes.
>
>The program is heavily annotated. I'm sure there are some more efficient
ways
>of doing some of the things in it. The parsing routine for paring off the
>rightmost character was picked up from code in the XyWrite DLG file, for
>instance, and it could probably be made more efficient.
>
>You'll probably want to load this onto a key and/or stuff it into a U2 file.
>
>Tim Baehr
>
>Attachment Converted: "C:\eudora\ATTACH\KEYS.PGM"
>

---------------------------------------
| Norman Bauman
| 411 W. 54 St. Apt. 2D
| New York, NY 10019
| (212) 977-3223
----------------------------------------