STYLELST.EXE

A Style Description Listing Utility

Version 3.01, January 29, 1989

STYLELST analyzes WordPerfect 5.0 style files (not WP5 documents that use or contain styles) in a user-specified directory. It creates a WP5 document containing the style file names and their descriptions. You can then use WordPerfect to retrieve and print the resultant file. The file is stored in the same drive/directory as the style files that are analyzed. The names of the styles are sorted alphabetically in the style listing file.

STYLELST normally creates a WP5 document file named <filename>.SLS, with a DOS text printer defined in the document. (There is an option to create a text file; see below.) When you retrieve the document from List Files (or Retrieve), WP5 will normally 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. One [Tab} and [Indent Left] is used to format the description of each style.

STYLELST 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 START THE PROGRAM

STYLELST is run at the DOS prompt by typing in

STYLELST

(We assume that you have STYLELST.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 STYLELST:

/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 SLS file directly to the printer. It will not create the SLS 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 will only analyze one file (or a group of files), then return to DOS. 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 option allows you to specify the style file name 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\LIBRARY.STY

(If you don't specify the drive/path, the default drive/path is used.) This option allows STYLELST 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\*.STY

Note that wildcards ("*" and "?") are only allowed with the "/F=" option. They are not allowed if you specify the file to analyze 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 command line that will analyze all STY files in the C:\WP50 directory, showing the Help screen first, then Quitting when it's done.

STYLELST /F=C:\WP50\*.STY /H /Q

HOW IT WORKS

The program was written and compiled using MicroSoft QuickBasic 4.0. 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, empty files, etc., and give you another chance to enter the correct file names.

STYLELST first asks you for the name of the style you wish to analyze (unless you have used the "/F=<filename>" command line option). If the file does not exist, the program will "beep". Enter the file name again, or type in QUIT to quit the program.

STYLELST normally creates a WP5 document file, unless you use the TEXT option (/T) on the DOS command line. The file has a file extension of SLS, so if you analyzed the style file C:\WP50\LIBRARY.STY, the program will create a C:\WP50\LIBRARY.SLS file. The SLS file, whether a DOS text file or WP5 document, looks like this:

STYLELST - STYLE FILE LIST/DESCRIPTIONS

Style file: MANUAL.STY

As of: 01-29-1989, 20:10

Style Name	Type	Description

Bibliogrphy	Paired	Bibliography

Bullet	Paired	Bullet, with indented block

Chaphead	Paired	Chapter Heading

Condense	Paired	Condense on/off pair (Ljet500 Line printer font)

Contents	Open	Table of Contents

...etc.

There is a limit of 256 styles that STYLELST will analyze in one style file. (We don't know how many styles you can have in a style file, so this is an arbitrary limit. We don't think you'll have a style file with more than 256 styles. But if you do, we'll change the program so you can have more.) The SLS 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 STYLELST has finished analyzing the file(s) you specified, you can enter another style file name. To quit the program, enter QUIT as the file name. (If the "/Q" (Quit) command line option is used, you are returned directly to DOS. Use the "/Q" option if you are using STYLELST in a batch file. Here's a sample command line to use in a batch file:

STYLELST /F=C:\WP50\*.STY /Q

RETRIEVING A "SLS" FILE INTO WORDPERFECT 5.0

If STYLELST creates a WP5 file (the default, unless you specify the "/T" option), start WP5 and use List Files and Retrieve to edit the SLS 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 SLS document is formatted for a DOS Text Printer, which most people haven't installed. So when you retrieve the file, WP5 will convert the SLS 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.

VERSION CHANGES:

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

1.1 (8/12/88)

Minor changes to put the version number shows on screen, a bit more error checking, cleaner screens.

1.2 (8/15/88)

Due to the way that styles are stored in a file, the program would sometimes miss style names. The program should get all of them now.

Note: Versions 1.x made it into distribution, but we pulled it from CIS since the problem in 1.2 was significant.

2.0 (11/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:

STYLELST TEXT

The style names in the list are now sorted. We 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.

2.01 (12/27/88)

Some minor changes to screen messages, and adding of color when a color monitor is available.

3.0 (1/25/89)

The various command line options were either added or enhanced. All options are now one letter wide, except for the "/F=<filename>" option. You'll need to change any batch files you used with prior versions to use the new command line options. The new command lines significantly enhance the program, especially if you want to analyze multiple files. See the "Command Line Options" section above for more details.

The HELP ("/H") option was expanded to show all command line options, a sample command line, and the command line that you specified. Pressing any key will continue the program, rather than returning to DOS.

The program code was completely re-written in an effort to make the program run faster. Error trapping for invalid file names, non-WP5 style files, etc., were improved. Most errors will give you a chance to re-enter the file name.

3.01 (1/29/89)

We discovered that an empty style file (file size of 0) would cause an error. And we forgot to delete the STYLELST.DIR file that we use to get the list of files to analyze. Both minor problems were fixed.

If you specified the "/Q" option, and there was an error (like a file not found), STYLELST would wait for you to press a key. Since "/Q" was meant to allow no user intervention (like when part of a batch file), this wasn't a nice thing to do. So now you get a "press any key" message only if you don't use the "/Q" option. If you do use the "/Q" option, you might catch a glimpse of the message.

STYLELST allows wildcards ("?" or "*") on the command line as part of the "/F" option. But the "?" wasn't caught; now it is.

IF YOU HAVE PROBLEMS

While we have tested this program extensively, 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 file, and that you don't have too many files in a directory (DOS has a limit of about 112 in the root directory of a drive).

We have noticed two minor problems, but they shouldn't affect your use of this program. Some style files insist on having storing duplicate style file name, but this rarely happens. You'll be able to tell since the style names are alphabetized. There's also no difference between a regular WP5 document and a Style file, except a style file doesn't have text. So you can use STYLELST on a regular document, but the printout won't make sense. We've got some ideas on how to prevent this, but since they are such minor problems, they'll be fixed in the next release. If you give all your style files the same extension (we use <filename>.STY), you can ignore the second problem.

STYLEDOC -- TO DOCUMENT STYLE FILE COMMANDS

We're in the process of creating a companion program called STYLEDOC, which will be sent to the WPSG forum on CompuServe when it's ready. It will actually translates the commands in a style file into English, creating a text file for each style file it finds. It's a great way to "hard-copy" your styles.

It will be a shareware program (registration will be $15). We're aiming for release sometime in February (but you know how product release date promises go!).

MACROLST and MACRODOC

We also have two similar programs for WP5 macros. MACROLST creates a file containing a list of all the macro files (and their descriptions) that are in a subdirectory.

MACRODOC creates a documentation file for each macro found in a subdirectory. This file contains the actual macro codes, similar to how you'll see with the WP5 Macro Edit command.

MACROLST is a public domain program, free for the asking. MACRODOC is shareware, and costs $15 to register. Both are great to document your macros, and are available on Compuserve's WPSG forum, DL 0, as MACROL.ARC and MACROD.ARC.

A SPECIAL DEAL

If you want to get registered copies all four programs, (STYLELST, MACROLST, MACRODOC, and STYLEDOC when available), send along a $25 registration fee (that saves $5) and a disk in a mailer. We'll send back the latest versions of those programs, and our thanks.

DISTRIBUTION OF THIS PROGRAM

This version of STYLELST (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). Please distribute the ARC file so that they will get this file, too. Although we've tested STYLELST, 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 the few 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 getting a "virgin" copy of the programs if you send me a disk (with return postage).

HOW TO FIND ME

I'm interested in you comments on how to improve the program, and especially if you have problems with the program. 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 CompuServe when they are ready, or when changes are made.

Send your comments (and the registration fee if you want to get MACRODOC and MACROLST, along with the latest version of STYLELST):

PLACER COMPUTER SYSTEMS

3488 Corwin Court, Loomis, CA 95650

Rick Hellewell (CIS: 71331,514)

In any case, thanks for using the program. We've found it real useful in tracking and documenting our styles. We hope you like it, too.

---30---