MACROLST.EXE

A Macro Description Listing Utility

Version 3.0, February 21, 1989

MACROLST is a program that creates a WP5 document containing macro file names and their descriptions. You can then edit and print that file using WordPerfect. (There is an option to create a text file, and to directly print the list; see "Command Line Options" below.) The file is stored in the same drive/directory as the macros. The macro list is sorted alphabetically by file name.

MACROLST normally creates a WP5 document file, with a DOS text printer defined in the document. When you retrieve the document from List Files (or Retrieve), WP5 will convert it to your default printer.

There are a few simple formatting codes in the document to help make the columns line up. A [Tab Set] code at the beginning of the document will set up the tabs properly. Several [Tab]'s and one [Indent Left] are used to format each line.

You specify the filename pattern of the macro files that you want analyzed by entering it on the DOS command line or in the program.

MACROLST seems to need about 90K of free memory to run, so you should be able to run it when you Shell to DOS with WP5's Ctrl/F1 key.

HOW TO RUN THE PROGRAM

In it's simplest form, MACROLST is run at the DOS prompt by typing in

MACROLST

(We assume that you have MACROLST.EXE available in the current directory, or in a directory specified by the DOS PATH command.)

COMMAND LINE OPTIONS

There are several command line options for MACROLST (command line options were changed with version 3.0):

/H	The HELP option shows you a sample command line, the command line options, and the command line you entered. Press any key to continue the program.

/M	Forces Monochrome mode, rather than our favorite cyan on blue colors, if a color card is sensed. This is for users with monochrome monitors connected to their color cards (or if you don't like our colors).

/P	The PRINT option prints the MLS file directly to the printer. It will not create the MLS file on disk, and will print in the default font on your printer. There are no printer control codes, so it will work with any printer. The "/T" (Text) option is not required when you use this option.

/Q	The QUIT option is used to quit after analyzing the group of files specified. Use this option combined with the "/F=<filename>" if you want to set up batch files that don't require user intervention.

/T	The TEXT option creates a text file, rather than a WP5 document. When using WordPerfect 5.0 to edit the text file, use List File's Text In command to retrieve it. The default is to create a WP5 document. The "/T" option is not needed when you use the "/P" (Print) option.

/F=<filename>	The FILENAME pattern option allows you to specify the macro drive/directory specification directly from the DOS command line, rather than inside the program. The <filename> should include the entire drive/path/file name for clarity, such as:

C:\WP50\*.WPM

(If you don't specify the drive/path, the default drive/path is used.) This option allows MACROLST to be run as part of a batch file, especially when used with the "/Q" (Quit) option.

You can specify wildcards in the <filename>, such as

/F=C:\WP50\MAC*.WPM or

/F=D:\WP50\ALT?.*

Note that wildcards ("*" and "?") are allowed with the "/F=" option or as part of the file pattern you specify after the program starts.

These options can be specified in any order, can be either upper- or lower-case, and spaces between commands are not required (although desireable for clarity). The options must be entered as shown, otherwise they are ignored.

Here's a sample command line to use in a batch file. It will analyze all WPM files in C:\WP50, Quitting to DOS when the program is completed.

MACROLST /F=C:\WP50\*.WPM /Q

HOW IT WORKS

The program was written and compiled using MicroSoft QuickBasic 4.5. It doesn't take a whole lot of memory (about 90K is needed), so you should be able to run it with the Shell/Go to DOS command. We've tried to anticipate most errors, such as incorrect file names, files not found, etc., and give you another chance to enter the correct file names.

MACROLST asks you for the filename pattern of the files you wish to analyze. For instance, you could enter C:\WP50\*.WPM to analyze all the WPM macro files in C:\WP50. (WP5 normally gives macros a file extension of WPM, although you can use your own file extension.) MACROLST then uses this filename pattern to create a directory listing of those files.

The program then throws away the first few lines of non-file text then opens each file in the file list. It looks for the description, and stores the file name, size, file date/time, and description in the MACROLST.MLS file that is created in the directory that contains the macro files (in our example, the file would be C:\WP50\MACROLST.MLS). The list of files are sorted alphabetically by file name.

MACROLST normally creates a WP5 document file, unless you use the TEXT option on the DOS command line. In either case, this is what it looks like:

MACROLST - MACRO FILE LIST/DESCRIPTIONS

Macro files: C:\WP50\*.WPM

As of: 02-20-1989, 6:15 PM

MACRO NAME	SIZE	DATE	TIME	DESCRIPTION

ALTD.WPM	86	11-25-88	9:49am	delete a whole line

ALTE.WPM	529	11-25-88	10:22am	go to end of paragraph

ALTG.WPM	121	11-25-88	9:49am	print/go command

ALTM.WPM	102	11-25-88	9:50am	(no description)

CTRLE.WPM	1672	11-25-88	9:50am	(not a macro file)

ENVELOPE.WPM	1672	9-29-88	2:46pm	print an envelope , prompts for address

FLUSH.WPM	84	8-04-88	8:10am	Flush right a paragraph

...etc...

When the program has finished looking at all the files you specified, the MACROLST.DIR file is deleted, and you are returned to the DOS prompt. Notice that some macros don't have a description, and that MACROLST determined that one of the files wasn't a macro file. MACROLST "chirps" when it finds a non-macro file, or if a file is empty. A short delay of three seconds is used when that happens, unless you've used the "/Q" command line option.

There is a limit of 256 files that MACROLST will analyze. (This is an arbitrary limit, it should be enough for almost everyone. If it's not, we'll change the program so you can have more.) The MLS file is normally a WP5 document file, use the Retrieve command in WordPerfect to edit it. (If you specified the "/T" command line option, a DOS text file is created. You'll need to use WP5's Text In/Out to retrieve it into a WP5 document.)

When MACROLST has finished analyzing the file(s) you specified, you can enter another filename pattern. To quit the program, enter QUIT as the file name (or just press Enter). (If the "/Q" (Quit) command line option is used, you are returned directly to DOS.) Use the "/Q" option if you are using MACROLST in a batch file.

RETRIEVING A "MLS" FILE INTO WORDPERFECT 5.0

If MACROLST creates a WP5 file (the default, unless you specify the "/T" option). Start WP5 and use List Files and Retrieve to edit the MLS document. Depending on your default printer, the text won't look right at first, because WP5 just needs to reformat your text. A quick way to do that is [Home][Home][Down Arrow], then [Home][Home][Up Arrow]. Everything will line up after that.

To print the file, first Retrieve it, then Print it. This will make sure that your default printer is selected for the file. The MLS document is formatted for a DOS Text Printer, which most people haven't installed. So when you retrieve the file, WP5 will convert the MLS file to use your printer definition. Just look at the Selected Printer when you use the Print command to make sure you have selected the correct printer; if not, Select the desired printer.

VERSION CHANGES:

MACROLST has gone through many changes since it's initial release last year. For those that have earlier versions, or are just curious, here's the changes made in each version:

1.1 (8/12/88): Minor changes to put the LST file in the directory that is specified, version number shows on screen, a bit more error checking.

1.2 (8/15/88): Added option to not sort the directory list, just in case the SORT command is not available. The command line would then read MACROLST NOSORT . Since the SORT command is an external DOS command, the SORT program must be in the current directory or available in the PATH. This corrects a problem noted by many users on the Source (Thanks to John Liebson, Bob Jacobson, Joan Freidman, and others for pointing out my glaring -- and embarrassing -- gaffe.)

2.0 (9/12/88): Due to popular request, I changed the program so that it would normally create a WP5 document, rather than a text file. But there is an option to create a text file, just add the word TEXT at the DOS command line:

MACROLST TEXT

You can also use the NOSORT option with the TEXT option:

MACROLST TEXT NOSORT

The options can be specified in any order. For more information about these options, please see COMMAND LINE OPTIONS, above.

I also added a HELP option, just in case. If you specify HELP, a help screen will appear, but the program will return you to the DOS prompt.

3.0 (2/21/89): We made some major changes in this version of MACROLST, mostly in the command line options, to make it similar to how STYLELST works. It also should run a bit faster, since we almost completely re-wrote the program. The new command line options are detailed in a prior section, they make the program a bit more powerful. You might especially like the ability to create a batch file that runs automatically without user intervention.

The MLS file also looks a bit different. We've included the file size along with the file date and time. The filename pattern you specified is shown, so the macro names are shown without the drive/directory name to make them a bit easier to see. You can specify any filename pattern you wish, earlier versions assumed that all macro files have a file extension of WPM (all others were ignored). We removed the requirement for the DOS SORT program, since we now sort the filenames internally. And the resultant list file has a file extension of MLS (for Macro LiSt).

Earlier versions of MACROLST had a tendency to leave extra DIR files laying around. We think we took care of that minor annoyance.

MACRODOC -- TO DOCUMENT MACRO FILE COMMANDS

We've also created a companion program called MACRODOC (available as MACROD.ARC in the WPSG forum DL0 section on CompuServe). It actually translates the commands in a WPM file into English, creating a text file for each WPM file it finds. It's a great way to "hard-copy" your WPM files.

It's a shareware program ($15), but if you send us a disk with return postage, we'll put it (and the latest version of MACROLST) on it and send it back to you. You can then decide if you want to register it. You can also get it on CompuServe; it only takes about 4 minutes at 2400 baud to download.

STYLELST -- OUR STYLE LISTING PROGRAM

We've written a program similar to MACROLST for style files. STYLELST will look at individual style files and extract the style name and description. The output is similar to MACROLST, shown above.

STYLELST is available on CompuServe in the WPSG forum, DL0.

STYLEDOC -- OUR STYLE DOCUMENTER

Our next project, after STYLELST, is a style documenter that works similar to MACRODOC. STYLEDOC will translate the styles into a text file, so you'll have written documentation for your styles, too. Look for STYLELST on Compuserve, or on your friendly neighborhood BBS.

A SPECIAL DEAL

If you want to get registered copies all four programs, (STYLELST, STYLEDOC (if available), MACROLST, and MACRODOC), send along a $25 registration fee (that saves $5) and a disk in a mailer. We'll send back the latest versions of those four programs, and our thanks. (Sometimes there's a short delay, especially if there's a newer version of the three programs that are about to be released.)

IF YOU HAVE PROBLEMS

While I tested this program quite a bit, it's possible that you might have problems. Some things to check are that you specify a drive/directory that actually exists, that there's enough room on the disk for the DIR and MLS file (the 114 macro file test took about 7K for the MLS file), and that you don't have too many files in a directory. If an error outside of the control of MACROLST is encountered, a cryptic error message from QuickBasic will be shown, and you'll be returned to the DOS prompt.

This version (3.0) is placed in the Public Domain. There's no charge for it's use, but please give me credit if you pass it around (we programmers are a humble people). Although we've tested MACROLST, and there's no "damaging" code, we can't be responsible for any damage to your system caused by this program or variations of the code. (With all the brain-damaged programmers out there that are writing virus programs, we trust that you'll perform the necessary precautions when dealing with all programs you download.) You can be sure of the latest version of this and the other programs if you send me a blank, formatted disk and return postage.

HOW TO FIND ME

I'm interested in comments to improve the program, and if you have problems. The easiest way to contact me is electronically. You can leave a message on CompuServe (71331,514) or on the Time Traveller BBS system (916) 739-8386 (2400-N-8-1). I'll try to respond quickly (I'm on Compuserve daily, and on Time Traveller weekly). I'll be posting information about this and the other programs on CIS when they are ready.

You can also contact me by mail at:

PLACER COMPUTER SYSTEMS

3488 Corwin Court, Loomis, CA 95650

Rick Hellewell (CIS: 71331,514)