Mac and PC On The ST
Making MS-DOS More User-Friendly
BY DAVID PLOTKIN
START CONTRIBUTING EDITOR
Editor's Note: If you're a new reader of this column, it's aimed at ST owners who use pc-ditto to emulate IBM-type computers and Magic Sac+ or Spectre 128 to emulate Apple Macintosh computers. Our goals in this column are to take a look at tools to make those unfamiliar computing environments easier, to review notable programs that are otherwise unavailable to ST owners and to report on developments in the area of ST emulations.
Last column, for you pc-ditto users, I took a look at Spinnaker's Easy Working DOS Shell that makes MS-DOS easier to use. This month, I'll take a look at another software tool for the same purpose, Precursor from The Aldridge Company, and also fulfill the promise I made in the November 1988 issue to examine batch files more closely. Let's take a look at batch files first.
Batch Files
As you should be aware, MS-DOS (PC-DOS) is a command-oriented operating system--you direct its actions by typing in commands. For example, to change directories, you would type: CD (or cd) followed by the new directory path. Batch files can automate the process of issuing commands. In essence, they are ASCII text files of DOS commands which are executed by the computer in the order they appear in the file.
Batch files are immensely powerful: you can pass parameters to them and jump to a different place in the batch file based on some rudimentary decision-making capability. You can also run programs from batch files (remember, machine language programs are essentially just another type of DOS command). It is beyond the scope of this column to look at all of the complicated ways that batch files can be used, but let's look at some simple ways that they can be used to make MS-DOS less painful.
Rolling Your Own Menu
One of the more difficult aspects of using MS-DOS is that you must remember the exact syntax of each command and the precise location of your programs. A simple menu can be built using batch files to make all of this easier. Because batch files are simple ASCII text files, you can construct one with any word processor that can save in ASCII format. Alternatively, you can use MS-DOS itself as a simple text editor.
Batch files always have a .BAT filename extender. You can execute a batch file at the MS-DOS prompt by typing its name (the .BAT is optional) just like other MS-DOS commands and programs. In order to build a menu batch file using MS-DOS, type in: copy con menu.bat. This tells the computer to copy everything typed at the keyboard (the "con"sole) into the file menu.bat. Then type the following:
echo off
cls
echo Do you want to:
echo 1. Use word processing
echo 2. Use DOS Shell
echo Type the number and press Return
Now press function key F6 and then Return. This short batch file will be saved to disk. The first line turns off the "echoing" of DOS commands, so that they are not repeated to the screen, the next line clears the screen, and the rest of the lines simply print information on the screen. To run this program, type in MENU at the MS-DOS prompt. Of course, all that happens is that the little menu is printed on the screen and the program ends, leaving you with the prompt. Here is where we get a little tricky. To use both choices in the menu above, you'd need to create two batch files, called "1.BAT" and "2.BAT". As an example, to run EW.EXE (Easy Working Word Processor in, say, directory EW) in response to menu choice number one, the following "1.BAT" file would work:
CD \EW | [change to proper directory] |
EW.EXE | [Run the program] |
CD \ | [After the program, return to the root directory] |
MENU.BAT | [Run the menu batch file again] |
If you type this in using copy con 1.bat (don't type in the comments in brackets), remember to press F6 at the end and then press Return. Notice that we ran another program from within the batch file, and also called another batch file (MENU). So what happens? We run MENU and it prints its messages on the screen, ending with a request for you to print the number of the application you want to run. When we type in the numeral 1 at the prompt, it runs the batch file "1.BAT"! which in turn runs the program EW.EXE. You should be able to see how to extend this to many program selections.
As you can see, batch files can make your life easier. A batch file can even be executed automatically on startup if it is named AUTOEXEC.BAT--something like the ST's AUTO folder. It can be used to set up the system, run configuration programs, etc. For example, my AUTOEXEC.BAT file installs the serial mouse driver, sets the time and date and other tasks I always want done whenever I start up.
Or Buying One . . .
If you don't feel like designing your own menus, try Precursor from The Aldridge Company. It's designed to making running programs from your hard disk much easier by setting up a menuing system. After copying it into a directory on your hard drive, you type INSTALL and the program prompts you for the information it needs to build the associated files. Once Precursor has been installed, you can start the Maintenance program, where you add or remove programs from the menus, set up password protection, activate a user log, set your colors and other functions.
Precursor supports multiple menu pages and each page can hold 12 selections. Each menu page can be named (i.e WORD PROCESSORS) so that you can group programs appropriately on separate pages. To install a program in the menu, you need only to type in what you want to show up on the menu (LOTUS 1-2-3, for example) and the name of the program you want run when that menu selection is made (i.e 123.COM). When you have entered all the menu selections and files, pressing F7 activates an autosearch, so that Precursor will search through the disk directories to find the programs.
Running programs from Precursor is simplicity itself. Just type the number of the item you want or highlight the item and press Return. When you are through running the program you are taken back to Precursor to make another selection. One thing you should do is set the system path (using the PATH command in your AUTOEXEC.BAT file) to include the Precursor's directory, so that you can simply type PREMENU from wherever you are to activate the program. You can even run Precursor automatically when you start up (that's how I do it) by including the PREMENU command in your AUTOEXEC.BAT file. In fact, the Precursor installation file will write out an AUTOEXEC.BAT file for you that includes the proper path command and calls PREMENU.
Precursor goes a long way to making MS-DOS friendlier, but there are still other ways, like using ANSI.SYS or commercial macro programs. So stay tuned. . .
David Plotkin is a chemical engineer with Chevron U.S.A and a long-time contributor to START.
PRODUCTS MENTIONED
pc-ditto, $89.95. AvantGarde Software, 381 Pablo Point Drive, Jacksonville, FL 32225, (904) 221-2904.
Precursor (version 3.1), $69. The Aldridge Company, 2500 City West Blvd., Suite 575, Houston, TX 77042, (713) 953-1940.