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

Re: Batch spelling enhancements; off-topic



Reply to note from "Patricia M. Godfrey"  Thu, 1
Nov 2001 17:44:26 -0500

> this is a transcription into human-language of the functions
> and commands:
> DF NI TR DF BC se /JM (Copy to CM)/ AS TF XC
> It would probably have been better to use the Define Line (DL)
> function, rather than having to position the cursor at the
> beginning of the word in question ...

Func DL includes the carriage return at the end of the line, so you
don't want that. One possibility is DW (Define Word). But the
foolproof combination is:

GT YD LB DF LE DF

That allows you to place the cursor anywhere on the line (even leave
it on the CMline) and still DeFine the entire word at the cursor
position in text (GT). It also ensures that hyphenated words are
completely DeFined, which func DW fails to do (perhaps irrelevant
here since the spell-checker treats hyphenated expressions as
separate words, but as a general matter...). The key funcs are LB
and LE, move cursor to Line Beginning and Line End. (TL and TR
would work as well, but they're more commonly used within tables.)

> Note that the Copy to CM has to be executed BEFORE the switch
> to the next window (which must contain the document).

True. (Incidentally, that should be CopytoCM -- no spaces). But a
more generic way of doing the same thing -- one that doesn't depend
on XY4.DLG being loaded -- would be:

BC se //AS TF XC

 saves the DeFined text to programming Save/Get 01; 
puts that text at the cursor position. And, once the contents of
S/G 01 are set, you no longer need to be in the current window to
move that text to the CMline. So you could, if you chose, recast
your code thus:

AS TF BC se //XC

> And Blind Execute or Q2 rather than XC; this was an old macro
> that may date back to Xy3. ...

No, you don't want BX...Q2 here, because part and parcel of your
procedure is:

> Once you're there, you can hit F9 repeatedly to find the next
> instance(s) of the word,

Repeated F9-ing doesn't work with BX: there'd be no command on the
CMline. Whenever you want your program to leave a command on the
CMline that the user can then continue to execute manually, you need
to use BC.

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/