APPLICATION NOTE #133 USING MULTIPLE PRINTERS Rev. 01 This application note describes a program that lets you toggle between printers by automatically loading the correct printer file for you. INTRODUCTION During the XyWrite installation procedure, you select the file that supports the printer you are using. XyWrite then copies that printer file onto your working disk and modifies the STARTUP.INT file so that the printer file you select is automatically loaded during the startup procedure. But suppose you are using more than one printer? For example, you may have an Epson FX-80 letter-quality printer and a Hewlett-Packard LaserJet attached to your system. You can only have one printer file loaded at a time, but you can use the procedure described below to simply toggle between two printer files. COPY FILES ONTO WORKING DISK Be sure that the printer files you need are on your working disk (or in your XyWrite subdirectory if you have a hard disk). To check, insert your working disk in the current drive and display a directory of all the printer files: Type: F5dir *.prn If the needed printer files are not listed, then you need to copy them off the XyWrite Printer File disk. 1. If you are using a dual floppy disk system, switch to drive A. (Hard disk users should switch to the XyWrite subdirectory.) Type: F5a: 2. Insert your working disk into drive A. 3. Insert the XyWrite Printer File disk into drive B. Display a directory of that drive. Type: F5dir b: Result: XyWrite displays a list of printer files on the disk. Locate the printer file you need. (If necessary, XyWrite III Plus users can repeat this step using Supplemental Disk 1, which contains additional printer files.) 4. With the directory displayed on the screen and the cursor on the name of the printer file you want to copy: Type: F5copy Result: The selected printer file is copied from the Printer File disk on drive B to the working disk on drive A (or to the XyWrite subdirectory on drive C). 5. Repeat step 4 for each printer file you need to copy. CREATE LOAD PROGRAMS The next step is to use XyWrite's programming language to create programs that load each printer file. For purposes of illustration, we will create two programs: one that loads the Epson FX printer file and one that loads the Hewlett-Packard LaserJet. 1. Create a new program file. Type: F5nep printer1 2. Enter the program. Press: Scroll Lock Type: F5load 3hplaser.prn Press: Scroll Lock Result: The display should show: BC load 3hplaser.prn 3. Store this file. 4. Repeat steps 1 through 3 for the Epson FX printer: Type: F5nep printer2 Type: Scroll Lock F5load 3epsonfx.prn Scroll Lock Type: F5st MODIFY THE STARTUP FILE If you plan to toggle between printers when you use XyWrite, set up the startup file so that the printer you use most often is automatically loaded. Then add the commands to load the programs created above onto Save/Get keys so you can access them whenever you want. 1. Call your startup file to the screen as a program file. Type: F5cap startup.int 2. Add the commands that assign your new programs to Save/Get keys. (You can use any keys you want, but you should reserve the selected keys for use with the assigned programs.) Press: Scroll Lock Type: F5ldpm printer1,h Press: Scroll Lock Press: Scroll Lock Type: F5ldpm printer2,e Press: Scroll Lock 3. Store and run the startup file. Type: F5st Type: F5run startup.int Result: The load printer programs are now assigned to keys H and E. USE THE PROGRAMS XyWrite automatically loads a printer file for you when you start up. This printer file should be the one you most frequently use. Continuing with the same examples we've used throughout this application note, let's assume that 3EPSONFX.PRN is the file loaded during startup. When you want to send a file to the LaserJet: Press: Alt-H Result: XyWrite loads the printer file 3HPLASER.PRN, which overwrites the printer file previously loaded into memory. When you use the TYPE command, XyWrite prepares the file for output on a Hewlett-Packard LaserJet. If you later want to output a file on the Epson FX printer, you need to reload the printer file associated with it. Press: Alt-E Note #1 Scroll Lock. When you press Scroll Lock with a program file open, XyWrite switches to record mode. This mode records all keystrokes as key codes for later execution. For example, when you press F5 while in record mode, BC appears in the file. You must press Scroll Lock again to turn record mode off, and return to normal keyboard functions. When record mode is on, an S appears in reverse mode at the top right of the screen. Note #2 Defaults. When you modify a XyWrite setting by issuing a DEFAULT command (in the printer file, startup file or from the command line), the new setting stays in effect until you reset it or turn off the system. Therefore, you must be sure that the printer files you are toggling between have equivalent settings so that when you load a new printer file, you reset everything. For example, 3HPLASER.PRN contains default settings for form depth (FD), page length (PL), form feed (FF), and page ejection (EJ); 3EPSONFX.PRN does not because it uses the built-in XyWrite defaults. Unless you modify 3EPSONFX.PRN to specifically define default settings for FD, PL, FF, and EJ, the values defined in 3HPLASER.PRN will remain in memory once loaded. Note #3 Subdirectories. If your programs (e.g., PRINTER1 and PRINTER2) are in a subdirectory, be sure to specify that subdirectory in the startup file. For example, LDPM \XY\PRINTER1,h. Note #4 Reserved Save/Gets. When you assign your programs to Save/Get keys, you can use any keys you want. Once you have made your selections, reserve those keys for use with your programs. Note #5 XyWrite III Users. The LOAD command is not available in XyWrite III. You must use the LDPRN command when creating the program files. In addition, XyWrite III does not include Supplemental Disk 1, which is referred to in this note. If the printer file you need is not on the Printer File disk, call our Technical Support Department to see if it is available.