                     README FOR ALT_F5F5.WPM, Version 1.0.1
                                November 11, 2001
                              by Timothy J. McGowan
                            timmcgowan@compuserve.com

INTRODUCTION
------------
Veteran users of WordPerfect for DOS, version 5.1+, have discovered a
problem with using F5-F5 in WP when Windows 2000 or Windows XP is
their operating system.  If the hard drive is formatted in NTFS or
FAT32, F5-F5 will not take you back to your previous position in List.

This readme file accompanies a macro named ALT_F5F5.WPM, which is
designed to let F5-F5 work in Windows 2000 (Win2K) and Windows XP,
both Home and Pro editions (WinXP).  It was designed in WordPerfect
for DOS version 5.1+, and cannot be guaranteed to work in earlier
versions of WP.  This macro is not necessary for any version of WP
higher than 5.1+.

Also, see the last section of this readme, WARNINGS, for more detail
than you care to get about other potential problems with this macro.
Note carefully the issue with tildes, as found in file and directory
names like C:\MYDOCU~1.  That one's a showstopper.


SYSTEM REQUIREMENTS
-------------------
This macro depends on features introduced in the 05/31/91 version of
WordPerfect 5.1.  It was designed and is known to work in the 03/21/94
version, and may rely on either new bugs or bug fixes introduced
between those two versions.


INSTALLATION
------------
To install, copy the macro to your macros directory.  To find your
macro directory, from the main document screen in WP, press Shift-F1
(Setup), then 6 (Location of Files), and make a note of the text
following "2 - Keyboard/Macro Files".  On many systems, this will read
      C:\WP51
but yours may differ.  Exit from Setup and exit WP, or shell out to
DOS.  Copy the macro to the directory noted in Setup and then get back
into WP.

Now install the macro into your keyboard definition:  Press Shift-F1
(Setup), then 5 (Keyboard Layout), and then 7 (Edit).  Press 7 again,
and then press the F5 key.  Type the filename of this macro (it was
originally ALT_F5F5.WPM, but it may be renamed) and press Enter.
Press F7 twice to return to your document.  You may now, if you wish,
delete the macro from your hard drive, because it's been copied into
your keyboard.  (No, this isn't the only way to tie a macro to a
keystroke, but it's an easy method to describe.)

You should notice no difference in the way F5 or F5-F5 works, except
that F5-F5 should work properly now when Listing the contents of a
directory on a FAT32 partition.


UNINSTALL
---------
To untie this macro from the F5 key (to uninstall), press Shift-F1,
then 5, and then 7.  Press the Down arrow key until you get to F5 in
the list.  Press 3 and then Y for Yes (or whichever key you use in
your language to answer Yes to the Yes/No prompts).  Press F7 twice to
return to your document.  You may delete the macro from your hard
drive as well, if you wish.


LANGUAGES
---------
{;}^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^~
To alter this macro for non-English versions of WPDOS 5.1+, you will
need to modify two sections of code.  The sections are set off the way
this paragraph is, with two long lines of carets (or circumflexes, if
you prefer).  Look within the macro for these sections and modify the
code as detailed there.  All attempts were made to make this as
painless as possible; this is the best possible solution.  Variables
for the keystrokes, assigned earlier in the macro, are not accepted by
{CASECALL}, and we are left with this kludge instead.
{;}^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^~

That may not be all there is to worry about, however, so test the
macro before relying on it.  Other adjustments may be necessary to
{LABEL}NameMonitor, found immediately below the second section that
needs to be modified for non-English versions of WP.  When performing
a Name search in List, the acceptable {KTON} of keys are set as 33
through 125 and the Backspace key.  Other languages may have a
different range of common characters.


LARGE DIRECTORIES
-----------------
If you have a directory of hundreds or thousands of files, you may
note some erratic reliability in the macro's being able to return you
to the last file your cursor was on in List.  To fix this, edit the
macro, looking for the line set off below, and change the number
specified to something larger than zero until the macro works as you
expect.  The number specifies the number of 10ths of a second to wait
between opening List and then searching for the last file you were on.
So {ASSIGN}McWait~10~ will wait for an entire second between the time
you see the List screen come up and the time the macro starts moving
the cursor down to where you left off last time.
{;}------------------------------------------------------------------~
   {ASSIGN}McWait~0~                   {;}useanypositiveinteger~
{;}------------------------------------------------------------------~


VARIABLES
---------
The macro relies on a total of five variables, one of which must
remain in memory (persistent) throughout your WP session.  If you rely
on persistent variables in other macros, and those variables have the
same names as the variables in this macro, you should edit this macro
to change the names to anything else.  Remember that although
variables can have names of 50-some characters, only the first seven
are evaluated for uniqueness.

      One persistent variable:    McCount

      Four temp variables:        x, Mc_Key, McWait, McState


WARNINGS
--------

Known bug & feature:  Normally, F5-F5 will return you to List just as
you left it; it doesn't get updated with new files you created while
in the main document screen.  This macro will update its listing every
time (nice), but it will return to the number of file you were from
the top, and thus might not hit the file you left off with (bad).  If
you don't create/save new files - under new names - while using this
macro, you won't notice a difference.

Known bug:  The directory being browsed cannot contain ANY files or
folders that include a tilde (~) in their name.  The macro will fail
spectacularly.  This is because of WP's use of the tilde in macro
design, and it cannot be worked around until a patch is issued for the
{SYSTEM}Entry~ command.  This is expected sometime around Never.  The
macro won't fail every time, but you should basically expect it to do
so. [THIS BUG IS NOW SOLVED FOR WP 5.1+ AND POSSIBLY EARLIER VERSIONS.]

Known bug:  The current default directory will change every time you
exit List by escaping or opening a file.  This doesn't happen with the
normal F5-F5.  This doesn't affect the WP system's default as entered
in Setup, just the current working directory.  It's like using "=" at
the F5 prompt.

Feature:  This macro is designed to work whether you set up List to
use the Long FileName "LFN" display (to show the Descriptive Names of
files) or the Short FileName "SFN" display.

Known bug:  When working with very large directories, there may be
problems with speed.  The macro reads the name of every file and
directory between your position when exiting List and the top of the
list.  If you're on a system, however, that truly supports WinXP, you
shouldn't notice the decrease in speed.

Known bug with workaround:  If you use LFN display and have one or
more files with "." (just a period) as the Descriptive Name, the macro
will act erratically (it will believe that that file is the name of
the current directory), but it won't cause any harm.  The macro will
be equally confused by a file with a Descriptive Name of ".." (just
two periods).  Workaround: Don't use "." or ".." as a Descriptive
Name, or include a space before or after the periods.

Known bug:  Of course, you can't start one macro while running
another.  If you use a macro to process a list of files, depending
upon F5-F5 to return you to your previous spot in List, you'll need to
cobble this code into your own macro.  You should be able to get by
with a {NEST}ALT_F5F5.WPM~ command in place of your current
{List}{List}.

Potential bug:  This macro was designed with Help being assigned to F3
and Cancel assigned to F1.  If you've switched these keystrokes on
your system, or have switched other standard key assignments around,
this may cause you great grief.  E-mail me if that happens, and we'll
see what we can do.

Known bug:  You can't use your mouse while the macro is running.  As
far as I know, you can't use your mouse while any macro is running.


SUPPORT
-------
Feel free to e-mail me, and I will do my best to help you.  Sometimes
I get buried with work, and response may be slow at times.  Questions
about WordPerfect, or questions about DOS, can be readily answered at
any of four resources which I can highly recommend:

Edward Mendelson, an editor of PC Magazine, has an excellent site
entirely devoted to running WP DOS, both 5.1 and 6, whether you're
using DOS or Windows, with updated printer drivers and more.  Visit:
http://www.columbia.edu/~em36/wpdos/

Gordon McComb, who has written a number of books on programming, and
two that I personally own about WP macros specifically, has a site
called WPUniverse with a great amount of information, including a book
on WordPerfect 5.1 macros which can be downloaded for free.  Visit:
http://www.wpuniverse.com/

CompuServe has two forums you may be interested in.  CompuServe's
forums are now free, and support most Web browsers.  One forum is
dedicated to WordPerfect; another I can recommend focuses on DOS
questions, and they gladly tackle issues involving using DOS programs
in Windows.  For WordPerfect, visit:
http://forums.compuserve.com/vlforums/default.asp?SRV=WordPerfect
and for DOS, visit:
http://forums.compuserve.com/vlforums/default.asp?SRV=VintageComputing


IN CONCLUSION
-------------
I hope this macro works for you.  I hereby copyright it so no one else
can claim it's their work, and I also hereby release it into the
public domain.  Use it and tinker with it as you like.
Thanks to Edward Mendelson of PC Magazine for posing the problem; I
enjoyed working on this!

Timothy J. McGowan
Metropolitan Court Reporters, Inc.
Minneapolis, Minnesota, USA
Please feel free to contact me via e-mail: timmcgowan@compuserve.com

