+--------------------------------------------------------------+ | | | | | (tm) | | ZAPCODE | | | | / | | /_ | | / | | / | | | | Professsional Printer Control | | | | Version 3.2 - Released May 18, 1990 | | | | (C) Copyright 1990 Robert L. Morton | | | | Morton Utilities, International | | 81-887 Tournament Way | | Indio, CA 92201 | | | | Compuserve 70132,3707 | | | | All Rights Reserved | | | | | | | +--------------------------------------------------------------+ _______ ____|__ | (tm) --| | |------------------- | ____|__ | Association of | | |_| Shareware |__| o | Professionals -----| | |--------------------- |___|___| MEMBER COPYRIGHT NOTICE This documentation and the software included with it as described in this documentation are copyrighted by Morton Utilities, Morton International. Except as described in the following license agreement, this document may not, in whole or in part, be reproduced, photocopied, transmitted, transcribed, stored on a retrieval system or translated into any language or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise, without the prior written consent of Morton Utilities, Morton International. Altering, modifying or adapting this software or documentaion, including, but not limited to, translating, decompiling, disassembling, or creating derivative works is prohibited. DISCLAIMER Morton Utilities, Morton International, makes no warranties or representation, either express or implied, with respect to this software or documentation, including their quality, performance, merchantability, or fitness for a particular purpose. In no event will Morton Utilities, Morton International, be liable for direct, indirect, special, incidental, or consequential damages arising out of the use of or inability to use this software or documentation. LICENSE AGREEMENT You are licensed to use this software on a trial basis for a period of fourteen days. If after the trial period, you wish to continue using ZAPCODE, you must purchase a permanent license from Morton Utilities, Morton International. (A permanent license costs only $19.95 - See section entitled "Purchasing ZAPCODE" for details.) You are granted a limited license to copy ZAPCODE only for the trial use of others subject to the agreement described above, and also the following: o ZAPCODE must be copied in unmodified form, complete with the following files and only the following files: ZAPCODE.COM - ZAPCODE program ZAPCODE.DOC - ZAPCODE program documentation INVOICE.DOC - Invoice for permanent license ASP.DOC - Association of Shareware Professionals Info. EPSFX.PMF - Printer driver: Epson FX Series HPLJ.PMF - Printer driver: Hewlett Packard LaserJet IBMCOLOR.PMF - Printer driver: IBM Color Printer IBMPRO.PMF - Printer driver: IBM Proprinter TSHP341.PMF - Printer driver: Toshiba P321SL/P341SL TSHP351C.PMF - Printer driver: Toshiba P351C Color Printer o No fee, charge or other compensation may be accepted or requested by anyone without express written consent from Morton Utilities, Morton International. o ZAPCODE may not be distributed in conjunction with any other product or service without a specific license to do so from Morton Utilities, Morton International. Electronic bulletin board operators (Sysops) may post ZAPCODE for downloading by their users without written consent only when the above conditions are met. A fee may be charged for access to the BBS as long as no specific fee is charged for access to the ZAPCODE files. ZAPCODE is distributed in a self-unarcing format. If your BBS uses a specific archive program for distributing programs, you may re-archive the ZAPCODE files using it. However, ONLY the files described above may be placed in the ZAPCODE archive. Disk vendors and other Shareware distribution companies which market diskettes containing Shareware programs for profit MUST obtain written consent from Morton Utilities, Morton International. Permission is usually given; please write for details. You are not allowed to modify this software under any conditions. You are, however, encouraged to create and distribute your own printer drivers using the extension "PMF". These may not, however, be placed in the ZAPCODE archive. TRADEMARKS ZAPCODE is a trademark of Morton Utilities, Morton International. IBM PC, XT, AT, and PS/2 are registered trademarks of International Business Machines. MS-DOS is a registered trademark of Microsoft Corporation. PC-DOS is a trademark of International Business Machines. EDLIN is a trademark of Microsoft Corporation. LOTUS 1-2-3 is a registered trademark of Lotus Development corporation. +--------------------------------------------------------------+ | Table Of Contents | +--------------------------------------------------------------+ Introducing ZAPCODE ......................................... 1 What is ZAPCODE? ...................................... 1 ZAPCODE Files ......................................... 2 System Requirements ................................... 2 Purchasing ZAPCODE .......................................... 3 Running ZAPCODE ............................................. 4 Command Line Switches ................................. 5 Using ZAPCODE ............................................... 6 Sending Printer Codes Manually ........................ 7 The "Enter Missing Parameter(s)" (EMP) Window ......... 7 Using The PMF Editor ........................................ 8 Edit Printer Code ..................................... 8 Adding an EMP Window ............................ 9 Editing an EMP Window ........................... 10 Deleting an EMP Window .......................... 10 Add Printer Code ...................................... 10 Delete Printer Code ................................... 10 Move Printer Code ..................................... 11 Configure Other Options ............................... 11 Printer Name .................................... 11 Port Setup ...................................... 11 Printer Reset Codes ............................. 12 Activation Hotkey ............................... 12 Window Colors ................................... 12 Keyboard Setup .................................. 13 The Printer Make File (PMF) ................................. 17 PMF Syntax and Guidelines ............................. 17 Example PMF ........................................... 18 APPENDIX A - PMF Commands ................................... 19 APPENDIX B - Shift Mask & Hotkey Tables ..................... 23 APPENDIX C - Calculating Window Colors ...................... 25 APPENDIX D - Special Keys Table ............................. 27 (C) Copyright 1990 Morton Utilities, Morton Intl. Page 1 +--------------------------------------------------------------+ | Introducing ZAPCODE | +--------------------------------------------------------------+ What is ZAPCODE? ---------------- ZAPCODE, simply put, is a printer control utility. With it, you can send control codes to your printer to activate or deactivate any of its options and features. Pop-up ZAPCODE at any time to, for example, reset your printer, turn on condensed print, or advance the page. ZAPCODE can also be used to automatically enter printer codes into your word processor, spreadsheet, or any other program. This is great for word processors that don't support all of your printer's features but allow you to embed printer control codes inside your documents. Simply pop-up ZAPCODE, select the desired printer option(s), and then let ZAPCODE enter the printer codes for you, just as if you had typed them at the keyboard. ZAPCODE can even be used to print envelopes, as a dialing directory, and even as a crude keyboard macro program. ZAPCODE is ideal for all types of printers including dot-matrix, laser, and even plotters. Additional features include: o Stand-alone running for those times when memory residency might not be disirable. o Support for any parallel printer attached to LPT1 to LPT3, and any serial printer attached to COM1 to COM4. o Completely customizable printer drivers. You can easily modify the included printer drivers to suit any desired configuration, or even create your own. o Memory resident activation over most applications, including those graphics-based. o Customizable window colors and activation hotkey. o Capability of multiple installations for those systems which require support for more than one printer. o Uninstallation of memory resident copies for those times when the extra RAM is needeed. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 2 ZAPCODE Files ------------- ZAPCODE consists of the following files: ZAPCODE.COM - ZAPCODE program ZAPCODE.DOC - ZAPCODE program documentation INVOICE.DOC - Invoice for permanent license ASP.DOC - Association of Shareware Professionals Info. EPSFX.PMF - Printer driver: Epson FX Series HPLJ.PMF - Printer driver: Hewlett Packard LaserJet IBMCOLOR.PMF - Printer driver: IBM Color Printer IBMPRO.PMF - Printer driver: IBM Proprinter TSHP341.PMF - Printer driver: Toshiba P321SL/P341SL TSHP351C.PMF - Printer driver: Toshiba P351C Color Printer All printer drivers end in the extension "PMF" (Printer Make File). Printer drivers have been included for some of the more popular printers. If your printer is not yet supported, you can easily build your own driver or customize one of the given. This will be covered shortly in the section "Using The PMF Editor". System Requirements ------------------- To use ZAPCODE you need: o IBM PC, XT, AT, PS/2, or compatible computer o A parallel or serial printer o PC-DOS or MS-DOS version 2.0 or later You'll also need at least 64K available memory to use ZAPCODE in stand-alone mode. 128K is required to use the PMF Editor. When installed in memory, ZAPCODE uses approximately 17K. However, depending on the size of the printer driver, an additional 10K is usually needed. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 3 +--------------------------------------------------------------+ | Purchasing ZAPCODE | +--------------------------------------------------------------+ ZAPCODE is distributed under the Shareware marketing system. The Shareware concept allows you, the user, to use a program on a trial basis to determine if it meets your needs. If you find the program useful and wish to continue using it, you are required to pay a license or registration fee to the author. If you recieved ZAPCODE through a distribution service and paid a small fee (usually $3 to $5), this does not constitute payment for ZAPCODE. You have simply paid for the distribution service. The $3.00 or $5.00 or whatever pays for the diskette, duplications and handling and does NOT constitute payment for the programs contained on the diskette. ZAPCODE license and registration costs $19.95. The file "INVOICE.DOC" contains an invoice which you may print and use for this purpose. Registering ZAPCODE gets you: 1. The latest version of ZAPCODE without the Shareware notice. 2. A professionally printed/bound 33 page manual. 3. All of the latest printer drivers. We're always creating new drivers for more printers. If yours isn't currently supported, we'll create it for you FREE. Just mention it to us on the invoice. 4. Six months support plus we'll notify you of any program updates and new products. The Shareware system is dependant upon honest people. If you use a Shareware program and have not registered with the author after the evaluation period, you are helping to destroy the viability of the Shareware concept. If you appreciate the ability to try software, before you buy it, then we encourage you to register EVERY Shareware program you use. Registration of Shareware products ensures the existance of quality, low-cost software. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 4 +--------------------------------------------------------------+ | Running ZAPCODE | +--------------------------------------------------------------+ To get ZAPCODE up and running, simply log into the drive and directory containing ZAPCODE and type: ZAPCODE A window will be displayed containing a list of all printer drivers in the current directory. Use the following keys: UpArrow - Move selection bar up one file DnArrow - Move selection bar down one file PgUp - Move selection bar up one page PgDn - Move selection bar down one page Home - Move selection bar to first file End - Move selection bar to last file Enter - Use the selected PMF in stand-alone mode I - Install the selected PMF in memory U - Uninstall last PMF installed in memory E - Edit the selected PMF A - Add/create a new PMF Esc - Exit Use the UpArrow, DnArrow, PgUp, PgDn, Home, and End keys to select a PMF. Press the Enter key to use the selected PMF in stand-alone mode. Consequently, ZAPCODE will not be installed in memory. Press the "I" key to install ZAPCODE and the selected PMF in memory. To confirm memory resident installation, a window is displayed containing printer setup, program activation, and memory information. The default hotkey for ZAPCODE is Ctrl-Alt-Z. That means, to activate ZAPCODE, hold down the Ctrl and Alt keys and press "Z". You may install as many copies of ZAPCODE as available memory will allow. If you have installed more than one copy and each shares the same hotkey, press the hotkey once to activate the copy installed last. Press it again to activate the copy installed prior to that, and so on. Press the "U" key to uninstall ZAPCODE from memory. If you have installed more than one copy, the last copy installed will be uninstalled. Uninstalling again will cause the copy installed prior to that one to be uninstalled. If you have loaded other memory resident utilities after ZAPCODE, it is possible that ZAPCODE will not be able to uninstall itself. When this happens, the message "Cannot uninstall" is displayed. Press the "E" key to edit the selected PMF. The "PMF Editor" allows you to easily create and edit printer drivers. See "Using The PMF Editor" for instructions. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 5 Press the "A" key to create a new PMF. A window will be displayed prompting for the PMF filename to create. Once you enter a filename, the "PMF Editor" is invoked and you can begin building your new printer driver. Command Line Switches --------------------- All of the above functions can be performed by use of command line switches. The complete syntax for ZAPCODE is: ZAPCODE [filename] [/I] [/U] [/E] "filename" is the name of the printer make file. It is not necessary to type the ".PMF" extension. /I installs ZAPCODE and the specified PMF in memory. /U uninstalls the last installed copy of ZAPCODE. /E invokes the PMF editor. You must also specify the name of the PMF you wish to edit. If the PMF does not exist, it will be created. If you wish to have a PMF loaded automatically each time you boot up, you may include ZAPCODE as an entry in your AUTOEXEC.BAT file. If other memory resident utilities are loaded in your AUTOEXEC.BAT and conflictions occur when loading ZAPCODE, try different variations in the order each is loaded. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 6 +--------------------------------------------------------------+ | Using ZAPCODE | +--------------------------------------------------------------+ When ZAPCODE is activated, a window is displayed containing the printer options. A bar hilights the currently selected option. The description window contains a description of the selected option. Another window contains a list of keys that can be used to control ZAPCODE. They are: UpArrow - Move selection bar up one option DnArrow - Move selection bar down one option PgUp - Move selection bar up one page PgDn - Move selection bar down one page Home - Move selection bar to first option End - Move selection bar to last option Insert - Send the selected option to keyboard Enter - Send the selected option to printer Spacebar - Send reset code sequence to printer Slash (/) - Manually enter codes to send to printer Esc - Exit ZAPCODE Use the UpArrow, DnArrow, PgUp, PgDn, Home, and End keys to select a printer option. Press the Insert key to send the control codes for the selected option to the keyboard. Use this feature to enter printer codes into your word processor, spreadsheet, or any other program. ZAPCODE can be configured to enter codes in a variety of formats including decimal and hexadecimal. This feature defaults off and you must use the "PMF Editor" to activate it. (See "Using The PMF Editor" for instructions.) This feature only works when ZAPCODE is memory resident. Pressing the Insert key when ZAPCODE is stand-alone or when this feature is off causes the speaker to beep and has no effect. Press the Enter key to send the control codes for the selected option to the printer. When done, the message "Codes Zapped" will be displayed if the operation was successful. If your printer is off-line or turned off, an error message will be displayed and you will be prompted for necessary action. Press the Spacebar to send the reset codes to the printer. This is a string of control codes used to restore all printer options to their power-on defaults. Some printers provide a control code for doing just this, while with others, each option must be restored individually. If there are no reset codes configured, this function has no effect. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 7 Sending Printer Codes Manually ------------------------------ Pressing the Slash (/) key causes a window to be displayed in which you may enter codes to send to the printer. The codes may be entered in any of three formats: Decimal - eg. 255 Hexadecimal - eg. 0FFh ASCII - eg. "&k4s" Codes must be seperated by a comma or a space. Codes entered in hexadecimal format must be preceded by a numeric digit and end with the character "h". Codes entered in ASCII format must be enclosed in quotation marks. AS YOU ENTER CODES, THE WINDOW WILL PAD ONCE YOU HAVE REACHED THE RIGHT MARGIN. This allows you to enter an unlimited number of codes. Example: 27,"&o2e5",0C5h While entering codes, use the following keys to edit and control ZAPCODE: LeftArrow - Move cursor left one character RightArrow - Move cursor right one character Ins - Toggle insert/overwrite entry modes Del - Delete character under cursor Backspace - Delete character left of cursor F1 - Display syntax help window Enter - Send entered codes to printer Esc - Abort Use the LeftArrow, RightArrow, Insert, Delete, and Backspace keys to edit what you have entered. Press F1 to display a window containing information about the syntax that must be used while entering codes. Press Enter to send the entered codes to the printer. Press Esc to abort. The "Enter Missing Parameter(s)" (EMP) Window --------------------------------------------- Some printer options require that a parameter or parameters be entered before they can be activated (eg. Set Tabs). Selecting one of these options causes a window to be displayed prompting you for the missing parameter(s). This window is identicle to the window used for entering codes manually. However, there is an additional window containing instructions explaining what is expected. Two additional keys are available for scrolling the instruction text: PgUp - Display previous page of instructions PgDn - Display next page of instructions Once you have entered the necessary parameter(s), the control codes for that option along with the missing parameter code(s) will be sent to the printer. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 8 +--------------------------------------------------------------+ | Using The PMF Editor | +--------------------------------------------------------------+ Using the PMF Editor, you can create and edit PMF's and change the following PMF control information: Printer Name Printer Port and Setup Printer Reset Codes Activation Hotkey Window Colors Keyboard Setup All control information is personal and stored in that PMF. This means that each PMF can have its own personal activation hotkey, window colors, and everything else. The PMF Editor's main editing screen is identicle to ZAPCODE's main selection window. There is an additional window displayed at the bottom containing status information and a list of keys that can be pressed to control editing. They are: E - Edit the selected code A - Add a new code after the selected D - Delete the selected code M - Move the selected code C - Configure other options The PMF filename and memory usage are displayed in the lower left corner. This memory amount reflects the number of bytes the PMF would use when installed in memory (using the "/I" switch). This amount does not include the 17K bytes ZAPCODE itself uses. Edit Printer Code ----------------- Press "E" to edit the selected printer code. A window will be displayed containing the printer code name, description and actual codes in decimal. Use the following keys during editing: UpArrow - Move to previous field DnArrow - Move to next field LeftArrow - Move cursor left one character RightArrow - Move cursor right one character Ins - Toggle insert/overwrite entry modes Del - Delete character under cursor Backspace - Delete character left of cursor Enter - Finish editing and save changes Esc - Abort without saving changes F1 - Display syntax help window Alt-A - Add EMP window at cursor Alt-E - Edit EMP window at cursor (C) Copyright 1990 Morton Utilities, Morton Intl. Page 9 Use the UpArrow and DnArrow keys to move between fields. Use the LeftArrow, RightArrow, Insert, Delete, and Backspace keys to edit the current field. Press Enter to finish editing and save changes. Press Esc to abort without saving changes. Press F1 to display a window containing information about the syntax that must be used while entering codes. You may press F1 only when the cursor is in the codes field. Press Alt-A to add an EMP window at the current cursor location. You may press Alt-A only when the cursor is in the codes field. Press Alt-E to edit the EMP window at the current cursor location. The box character symbolizes an EMP window. You may press Alt-E only when an EMP window symbol is displayed at the current cursor location. * Adding An EMP Window * To add an EMP window, place the cursor at the position within the codes that the "missing parameter" codes should be inserted. Then press Alt-A. A window will then be displayed in which you may enter the EMP instruction text. The following keys can be used while entering instruction text: UpArrow - Move cursor up one line DnArrow - Move cursor down one line LeftArrow - Move cursor left one character RightArrow - Move cursor right one character Ins - Toggle insert/overwrite entry modes Del - Delete character under cursor Backspace - Delete character left of cursor PgUp - Move to previous page of instruction text PgDn - Move to next page of instruction text Enter - Finish entering EMP instruction text Esc - Abort Use the UpArrow, DnArrow, LeftArrow, RightArrow, Insert, Delete, and Backspace keys to edit the instruction text. If you need additional pages to enter instructions, press the PgDn key. The PgUp key allows you to move back to previous pages. Press Enter to finish and save the new EMP. Press Esc to abort without saving. You may create as many EMP windows for a printer option as you like. When the printer option is then later used, each EMP window will display and prompt in the order it is found in the control codes. For example, If you defined the following: "Hello ",EMP#1," My name is ",EMP#2,".",13,10 (EMP#1 and EMP#2 would be displayed as box characters.) When this option is printed, the following happens: (C) Copyright 1990 Morton Utilities, Morton Intl. Page 10 1. "Hello " is sent to the printer. 2. EMP window #1 is displayed and you are prompted for "missing parameter" codes. Let's assume you respond by typing "everybody." (quotation marks included). 3. "everybody." is sent to the printer. 4. " My name is " is sent to the printer. 5. EMP window #2 is displayed and you are prompted again. Let's assume you respond by typing "John Doe". 6. "John Doe" is sent to the printer. 7. "." is sent to the printer. 8. Character 13 (carriage return) and 10 (linefeed) are sent to the printer. Your printer would have printed the following: Hello everybody. My name is John Doe. EMP windows allow you to do all sorts of great things. Use an EMP window to prompt for the tab stops in a "Set Tabs" control code sequence. Use one to prompt for the recipient's address for printing envelopes. Examine the included PMF's for examples. * Editing An EMP Window * To edit an EMP window, place the cursor on the EMP window symbol and press Alt-E. A window will be displayed containing the instruction text. Follow the same rules for editing an EMP as you did for adding. * Deleting An EMP Window * To delete an EMP window, place the cursor on the desired window symbol and press the delete key. You will be prompted for confirmation before the window is actually deleted. Attempting to type over the EMP window symbol will also delete it. ZAPCODE will ask you to confirm before it does so. Add Printer Code ---------------- To add a printer code, press "A". A window will be displayed in which you may enter the name, description, and printer codes. Follow the same rules for adding a printer code as you did for editing. When finished, the code will be added immediately after the one that was selected when the "A" key was pressed. Delete Printer Code ------------------- To delete the selected printer code, press "D". You will be prompted for confirmation before the code is actually deleted. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 11 Move Printer Code ----------------- The move command allows you to organize and group the printer codes. To move the selected code, press "M". Then select the destination for the move using the UpArrow, DnArrow, PgUp, PgDn, Home, and End keys. The printer code will be moved to the entry immediately before the selected destintation. Press Enter to perform the move. Press Esc to abort. Configure Other Options ----------------------- Pressing "C" allows you to configure the following PMF control information: Printer Name Port Setup Reset Codes Activation Hotkey Window Colors Keyboard Setup Use the UpArrow and DnArrow keys to select. Press Enter to configure the selected. Press Esc to abort. * Printer Name * This option allows you to enter/edit the printer name. A window is displayed containing the printer name for the PMF. Use the following keys: LeftArrow - Move cursor left one character RightArrow - Move cursor right one character Ins - Toggle insert/overwrite entry modes Del - Delete character under cursor Backspace - Delete character left of cursor Enter - Save changes made Esc - Abort without saving changes Use the LeftArrow, RightArrow, Insert, Delete, and Backspace keys to edit the printer name. Press Enter to save new printer name. Press Esc to abort without saving. * Port Setup * This option allows you to select and configure the printer port. A window is displayed containing the current port assignment. Your choices are: LPT1: Parallel 1 LPT2: Parallel 2 LPT3: Parallel 3 COM1: Serial 1 COM2: Serial 2 COM3: Serial 3 COM4: Serial 4 (C) Copyright 1990 Morton Utilities, Morton Intl. Page 12 Selecting any of the serial ports (COM1 to COM4) will present further configuration windows allowing you to select baud rate, data parity, number of data bits, and number of stop bits. Baud rate can be any of the following: 300, 1200, 2400, 4800, 9600, 19200, or 38400 bps. Data parity can be either Odd, Even, None, Space, or Mark. The number of data bits can be either 7 or 8 and the number of stop bits can be either 1 or 2. * Printer Reset Codes * This option allows you to configure the printer reset codes. The printer reset codes can be sent by pressing the spacebar from ZAPCODE's main window. Selecting this options causes a window to be displayed containing the current reset codes for the PMF. Use the following keys: LeftArrow - Move cursor left one character RightArrow - Move cursor right one character Ins - Toggle insert/overwrite entry modes Del - Delete character under cursor Backspace - Delete character left of cursor F1 - Display syntax help window Enter - Finish and save changes Esc - Abort without saving changes Use the LeftArrow, RightArrow, Insert, Delete, and Backspace keys to edit the reset codes. Press F1 to display a window containing information about the syntax that must be used. Press Enter to finish and save changes. Press Esc to abort without saving changes. * Activation Hotkey * This option allows you to change the key combination used to activate ZAPCODE for this PMF. A window will be displayed prompting for the new activation hotkey. You may use any combination of the shift keys (Ctrl, Alt, LeftShift, and RightShift) while entering a new hotkey. For example: To set the new hotkey to Ctrl-Alt-P, hold down the Ctrl and Alt keys and press "P". If you entered it incorrectly the first time, enter it again. Once you have entered it correctly, you must enter it once again to confirm. * Window Colors * This option allows you to change the ZAPCODE window colors. The colors for the following windows can be changed: (C) Copyright 1990 Morton Utilities, Morton Intl. Page 13 Installation Window Main Window Enter Codes to Send Window Syntax Help Window EMP Window Printer Reset Window Codes Zapped Window Printer Error Window A window will be displayed in the bottom right corner prompting you for the desired window whose colors you wish to change. Use the UpArrow and DnArrow keys to select desired window. As you select each window, it is displayed in the upper left corner. Press Enter to confirm selection. Press Esc to end. After selecting a window, you will be prompted to select a window part. Use the UpArrow and DnArrow keys to select desired window part. As you select each window part, its color will be displayed. Press Enter to confirm selection. Press Esc to return to window selection. After selecting a window part, you will be prompted to select a new background color. Use the UpArrow and DnArrow keys to select desired color. As you select each color, the window will be updated to reflect it. Press Enter to confirm selection. Press Esc to return to part selection. After selecting a background color, you will be prompted to select a new foreground color. Use the UpArrow and DnArrow keys to select desired color. As you select each color, the window will be updated to reflect it. Press Enter to confirm selection. Press Esc to return to background color selection. * Keyboard Setup * The "Keyboard Setup" option allows you to tailor the way ZAPCODE sends printer codes to the keyboard. The following options allow you to customize ZAPCODE to work with virtually any program: Code Format String Prefix String Suffix Code Prefix Code Suffix Code Delimiter "Code Format" is the format each code is expressed in. The following formats are available: Decimal ............................... 5,15,255 Decimal 3 character ................... 005,015,255 Hexadecimal with digit start .......... 5,0F,0FF Hexadecimal without digit start ....... 5,F,FF Hexadecimal 2 character ............... 05,0F,FF Hexadecimal 3 character ............... 005,00F,0FF ASCII (C) Copyright 1990 Morton Utilities, Morton Intl. Page 14 The examples to the right demonstrate how three codes (5, 15, and 255) are expressed when that format is used. "Hex with digit start" means that a numerical digit (0-9) must always lead the number. This is the format ZAPCODE prefers to accept hexadecimal numbers in. The last format, "ASCII", causes each code to be entered as its ASCII character equivalent. Thus, the following codes: 72 101 108 108 111 would yeild their ASCII equivalents: H e l l o The NUL code (character 0) can be used to define special keys and key combinations. For example, the following codes: 0 59 65 66 67 0 19 translate into: F1 A B C Alt-R Codes 0 and 59 define the F1 function key. Codes 65, 66, and 67 define keys "A", "B", and "C" respectively. Codes 0 and 19 define the Alt-R key combination. See Appendix D for a complete list of special keys and the codes needed to define them. There aren't many programs that you would use the "ASCII" format for entering printer codes into. However, it does add to ZAPCODE's functionality in that it allows you to create keyboard macros. You could, for instance, create a PMF dedicated to this cause entirely. To use one of the macros, you would simply pop-up ZAPCODE, select it, and voila! "String Prefix", "String Suffix", "Code Prefix", "Code Suffix", and "Code Delimeter" are used to specify what comes before, after, and in the middle of each individual code and the entire string of codes. Each of these is sent to the keyboard as an "ASCII" format string. This means you may use special keys and key combinations in them. "String Prefix" specifies what comes before the entire string of codes. "String Suffix" specifies what comes after the entire string of codes. "Code Prefix" specifies what comes before each individual code. "Code Suffix" specifies what comes after each individual code. "Code Delimeter" specifies what comes between each individual code. If three codes were sent, they would look like this: SP, CP, Code1, CS, CD, CP, Code2, CS, CD, CP, Code3, CS, SS SP = String Prefix SS = String Suffix CP = Code Prefix CS = Code Suffix CD = Code Delimeter (C) Copyright 1990 Morton Utilities, Morton Intl. Page 15 Consider the following example: Code Format = Decimal 3 character String Prefix = "/PPOS" String Suffix = 13,"QQ" Code Prefix = "\" Code Suffix = (nothing) Code Delimeter = (nothing) The above configuration can be used to enter codes into Lotus 1-2-3. Lotus 1-2-3 requires that each code be expressed as a three digit decimal number and that each is prefixed by the backslash character "\". The "String Prefix" moves 1-2-3 to the "Setup string:" option. The "String Suffix" moves 1-2-3 out of the "Setup string:" option and back to the spreadsheet. With this configuration, all that is needed to do is: 1. Pop-up ZAPCODE. 2. Select desired printer option. 3. Press the Insert key. 4. Goto step 2 if more. 5. Press Esc key. You may also use the "Send to keyboard" feature to insert printer codes into ZAPCODE itself. For instance, you might want to create two PMF's for your printer. One would contain a definition for each individual printer option. The other might contain entire setup strings which might combine individual printer options. To create this second PMF, you could use the first to insert the codes into the PMF Editor. The "Keyboard Setup" for the first would look like this: Code Format = Decimal String Prefix = "A",0,80,0,80,0,80,0,80,0,80,0,80 String Suffix = 0,72,0,72,0,72,0,72,0,72,0,72 Code Prefix = (nothing) Code Suffix = (nothing) Code Delimeter = "," The "String Prefix" contains: "A" key to tell PMF Editor to add a new option. Six DnArrow keys to move the cursor to the "Codes" field. The "String Suffix" contains: Six UpArrow keys to move the cursor back from the "Codes" field up to the "Name" field. With this PMF resident in memory and while your using the PMF Editor to create the second: 1. Pop-up ZAPCODE (which contains the PMF for the first). 2. Select desired printer options you wish to combine. 3. Press Esc key. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 16 You must pop-up ZAPCODE from the main PMF Editor window since the "String Prefix" will take care of adding a new option and moving to the "Codes" field. Once you've exited the resident copy, the codes will be entered and the cursor will be moved to the "Name" field. (C) Copyright 1990 Morton Utilities, Morton Intl. Page 17 +--------------------------------------------------------------+ | The Printer Make File (PMF) | +--------------------------------------------------------------+ The PMF is simply an ASCII text file which you may edit using a line editor (such as EDLIN) or a word processor. The PMF Editor allows you to easily customize and create your own PMF's without regard to PMF syntax or structure. You may, however, do the same by simply text editing the PMF. This section and appendixes A, B, and C describe the PMF structure, syntax, and conventions in detail. The PMF consists of commands which tell ZAPCODE the following: Printer Name Printer Port and Setup Printer Reset Codes Activation Hotkey Window Colors Keyboard Setup Printer Option Names Printer Option Descriptions Printer Option Control Codes Each command consists of a keyword and a number of arguments. The keyword identifies what is being defined, while the arguments define it. Appendix A contains a complete list of all PMF commands and their usage. PMF Syntax and Guidelines ------------------------- 1. Keywords must be in all capital letters. 2. Keywords may start at any location within the line. 3. Comments may be used by placing a semicolon before the comment text. 4. Blank lines are permitted. 5. The equals sign (=) is not necessary but may be used to enhance the clarity of the PMF. 6. Arguments may be entered in any of three formats: Decimal eg. 255 Hexadecimal eg. 0FFh ASCII eg. "XYZ" Arguments must be seperated by a comma or a space. Arguments entered in hexadecimal must be preceded by a numeric digit and end with the character "h". Arguments entered in ASCII must be enclosed in quotation marks. To use the quotation mark in an ASCII argument, you must define it twice. The following page contains an example PMF: (C) Copyright 1990 Morton Utilities, Morton Intl. Page 18 ;--------------------------------------------------------------- ; PMF for Printer XYZ ;--------------------------------------------------------------- PRINTER = "XYZ Printer" ;Printer name PORT = "COM2:9600,N,8,1" ;Printer port/setup RESET = 27,"?",1 ;Reset codes ACTIVATE = 8,25,"Press Alt-P to activate." ;Alternate hotkey KCFORMAT = 2 ;Decimal 3 char KSPREFIX = "/PPOS" ;String prefix KSSUFFIX = 13,"QQ" ;String suffix KCPREFIX = "\" ;Code prefix COLOR = 2,0,0,0,0,0,0,30 ;Change selection ;bar color to ;yellow on blue. NAME = "Compressed Print" ;Option name DESC = "This command selects 16.7" ;Option description "characters per inch (cpi)." CODES = 0Fh ;Control codes NAME = "Set Horizontal Tab Stop(s)" DESC = "This command allows you to set" "horizontal tab stops." CODES = 27,44h 0 ;Start of EMP "Enter locations you wish to set a" "horizontal tab stop at in ascending" "order. You may set up to 28." " " "Example: Entering 10,20,40 would" "set three tab stops, at locations" "10, 20 and 40." 0 ;End of EMP 0,0 ;NUL code NAME = "Select NLQ Print" DESC = "Activate Near Letter Quality (NLQ)" "printing. Characters printed in NLQ" "are crisper and more like the" "characters produced by a type-" "writer." CODES = 27,120,1 (C) Copyright 1990 Morton Utilities, Morton Intl. Page 19 +--------------------------------------------------------------+ | Appendix A - PMF Commands | +--------------------------------------------------------------+ The following is a complete list of all PMF commands. Provided with each is its desciption, usage, and an example: Command ....... PRINTER Description ... Names the printer for which the PMF is created. Up to 29 characters can be used. Usage ......... PRINTER [printer name] Example ....... PRINTER "XYZ Printer" Command ....... PORT Description ... Defines the port for which the printer is connected. Usage ......... PORT [port:baud,parity,data,stop] port = LPT1, LPT2, LPT3, COM1, COM2, COM3, COM4 baud = 300, 1200, 2400, 4800, 9600, 19200, 38400 parity = O)dd, E)ven, N)one, S)pace, M)ark data = 7, 8 stop = 1, 2 Baud, parity, data, and stop only used when defining serial ports COM1 to COM4. Example ....... PORT "COM2:9600,N,8,1" Command ....... RESET Description ... Defines the reset codes to be sent to the printer when a reset is requested. Up to 255 codes may be defined. Usage ......... RESET [code1, code2,... code255] Example ....... RESET 27,"?",1 Command ....... ACTIVATE Description ... Defines an alternate hotkey to be used to activate ZAPCODE when installed in memory. If none is defined, the hotkey defaults to Ctrl- Alt-Z. Usage ......... ACTIVATE [shiftmask, hotkey, install message] install message = message to display in installation window when ZAPCODE is installed. Up to 35 characters can be used to define a message. See Appendix B for shiftmask and hotkey values. Example ....... ACTIVATE 8,25,"Press Alt-P to activate." (C) Copyright 1990 Morton Utilities, Morton Intl. Page 20 Command ....... COLOR Description ... Defines alternate color(s) for one of ZAPCODE's windows. You may use as many color commands as there are windows. Usage ......... COLOR [window, color1, color2,... color7] Entering a 0 value for a color argument causes the default to be used. See Appendix C for window numbers and color values. Example ....... COLOR 2,0,0,0,0,0,0,30 Command ....... KCFORMAT Description ... Defines "Code Format". Usage ......... KCFORMAT [format] format = 0:Off 1:Decimal 2:Decimal 3 character 3:Hex with digit start 4:Hex w/o digit start 5:Hex 2 character 6:Hex 3 character 7:ASCII Example ....... KCFORMAT 2 Command ....... KSPREFIX Description ... Defines "String Prefix". Up to 30 characters can be used. Special keys and key combinations may be defined by preceding each with a NUL code (0). See Appendix D for list. Usage ......... KSPREFIX [code1, code2,... code30] Example ....... KSPREFIX "ABC",13,0,80,27,"DEF" Command ....... KSSUFFIX Description ... Defines "String Suffix". Up to 30 characters can be used. Special keys and key combinations may be defined by preceding each with a NUL code (0). See Appendix D for list. Usage ......... KSSUFFIX [code1, code2,... code30] Example ....... KSSUFFIX "ABC",13,0,80,27,"DEF" Command ....... KCPREFIX Description ... Defines "Code Prefix". Up to 30 characters can be used. Special keys and key combinations may be defined by preceding each with a NUL code (0). See Appendix D for list. Usage ......... KCPREFIX [code1, code2,... code30] Example ....... KCPREFIX "ABC",13,0,80,27,"DEF" (C) Copyright 1990 Morton Utilities, Morton Intl. Page 21 Command ....... KCSUFFIX Description ... Defines "Code Suffix". Up to 30 characters can be used. Special keys and key combinations may be defined by preceding each with a NUL code (0). See Appendix D for list. Usage ......... KCSUFFIX [code1, code2,... code30] Example ....... KCSUFFIX "ABC",13,0,80,27,"DEF" Command ....... KCDELIM Description ... Defines "Code Delimeter". Up to 30 characters can be used. Special keys and key combinations may be defined by preceding each with a NUL code (0). See Appendix D for list. Usage ......... KCDELIM [code1, code2,... code30] Example ....... KCDELIM "ABC",13,0,80,27,"DEF" Command ....... NAME Description ... Defines the name of a printer option. All printer option names are placed in the selection window in the order they appear in the PMF. Up to 35 characters can be used to name printer options. Usage ......... NAME [option name] Example ....... NAME "Set Horizontal Tab Stop(s)" Command ....... DESC Description ... Defines the printer option description. The description is displayed in the description window when its option is selected. Up to 5 lines of 35 characters each can be used to define a description. Usage ......... DESC [description line 1] [description line 2] ... [description line 5] Example ....... DESC "This command allows you to set" "horizontal tab stops." (C) Copyright 1990 Morton Utilities, Morton Intl. Page 22 Command ....... CODES Description ... Defines the codes to be sent to the printer when its option is selected. There is no limit to the number of codes that can be defined. For those options which require parameter(s) to be included within the codes, you may define an EMP window. To do so, mark the start and end of the instruction text with a NUL code (0). You may define as many lines of instruction text as you wish. Up to 35 characters can be used per line. When the EMP window is displayed, your instructions will be paged in sets of 10 lines. You may define as many EMP windows as you wish. To define a NUL code to be sent to the printer, you must define it twice. Usage ......... CODES [code1,code2] 0 [instruction text] 0 [code3,code4,...] Example ....... CODES 27,44h 0 "Enter locations you wish to set a" "horizontal tab stop at in ascending" "order. You may set up to 28." 0 0,0 (C) Copyright 1990 Morton Utilities, Morton Intl. Page 23 +--------------------------------------------------------------+ | Appendix B - Shift Mask & Hotkey Tables | +--------------------------------------------------------------+ This appendix contains the Shift Mask and Hotkey tables used for defining an alternate activation hotkey. (See the ACTIVATE command in Appendix A for a discussion.) To activate ZAPCODE, a combination of shift keys along with a hotkey must be depressed. The shift keys are the Ctrl, Alt, LeftShift, and RightShift keys, while the hotkey can be any other. To setup your own, you'll need to substitute a value from the Shift Mask Table for the argument "shiftmask" and substitute a value from the Hotkey Table for the argument "hotkey". The Shift Mask and Hotkey tables are on the next page. Example: To change the activation key sequence to Alt-P, you would substitute 8 for "shiftmask" and 25 for "hotkey". (C) Copyright 1990 Morton Utilities, Morton Intl. Page 24 SHIFT MASK TABLE =============================================================== Alt | * * * * * * * * Ctrl | * * * * * * * * L-Shift | * * * * * * * * R-Shift | * * * * * * * * --------------------------------------------------------------- Dec Value | 0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 | 0 1 2 3 4 5 =============================================================== HOTKEY TABLE =============================================================== Key Dec | Key Dec | Key Dec --------------------------------------------------------------- Esc 1 | A 30 | F1 59 !1 2 | S 31 | F2 60 @2 3 | D 32 | F3 61 #3 4 | F 33 | F4 62 $4 5 | G 34 | F5 63 %5 6 | H 35 | F6 64 ^6 7 | J 36 | F7 65 &7 8 | K 37 | F8 66 *8 9 | L 38 | F9 67 (9 10 | :; 39 | F10 68 )0 11 | "' 40 | NumLock 69 _- 12 | ~` 41 | ScrollLock 70 += 13 | L-Shift 42 | 7Home 71 Backspace 14 | |\ 43 | 8UpArrow 72 Tab 15 | Z 44 | 9PgUp 73 Q 16 | X 45 | - 74 W 17 | C 46 | 4LeftArrow 75 E 18 | V 47 | 5 76 R 19 | B 48 | 6RightArrow 77 T 20 | N 49 | + 78 Y 21 | M 50 | 1End 79 U 22 | <, 51 | 2DownArrow 80 I 23 | >. 52 | 3PgDn 81 O 24 | ?/ 53 | 0Ins 82 P 25 | R-Shift 54 | .Del 83 {[ 26 | PrtSc* 55 | SysReq 84 }] 27 | Alt 56 | F11 87 Enter 28 | Spacebar 57 | F12 88 Ctrl 29 | CapsLock 58 | =============================================================== (C) Copyright 1990 Morton Utilities, Morton Intl. Page 25 +--------------------------------------------------------------+ | Appendix C - Calculating Window Colors | +--------------------------------------------------------------+ ZAPCODE consists of eight windows in which any of seven colors can be changed. This appendix outlines the window numbers and their color assignments. (See Appendix A for a discussion of the COLOR command.) To change a window color, you must substitute the desired window number for the argument "window", and a color value for one of the arguments "color1", "color2", etc. depending on which window part you want to change. The Window Color Assignment Table (on the next page) lists each window number and its part assignments. To calculate the actual color value that must be substituted, you must use the following formula: colorvalue = (background x 16) + foreground The table below contains the background and foreground color numbers which must be substituted in the equation above. COLOR TABLE ========================================= 0 Black 8 Gray 1 Blue 9 Light Blue 2 Green 10 Light Green 3 Cyan 11 Light Cyan 4 Red 12 Light Red 5 Magenta 13 Light Magenta 6 Brown 14 Yellow 7 White 15 High-intensity White ========================================= For example, to change the selection bar color to yellow on blue, you would use the following equation: colorvalue = (1 x 16) + 14 This would yield 30 for the "colorvalue" argument. Thus your COLOR statement would be: COLOR 2,0,0,0,0,0,0,30 (C) Copyright 1990 Morton Utilities, Morton Intl. Page 26 WINDOW COLOR ASSIGNMENT TABLE ================================================================ | (1) Installation Window | (2) Main Window | 1. Border | 1. Border 2. Title | 2. Titles 3. Printer description | 3. Code names 4. Activate help | 4. Code description 5. Memory amounts | 5. Help text 6. Memory amounts' labels | 6. Help text hilight 7. N/A | 7. Selection bar | --------------------------------|------------------------------- | (3) Enter Codes to Send Window | (4) Syntax Help Window | 1. Border | 1. Border 2. Title | 2. Title 3. Input area | 3. Help text 4. Help text | 4. Help text hilight 5. Help text hilight | 5. N/A 6. N/A | 6. N/A 7. N/A | 7. N/A | --------------------------------|------------------------------- | (5) EMP Window | (6) Printer Reset Window | 1. Border | 1. Border 2. Titles | 2. Text 3. Input area | 3. N/A 4. Instruction text | 4. N/A 5. More indicator | 5. N/A 6. Help text | 6. N/A 7. Help text hilight | 7. N/A | --------------------------------|------------------------------- | (7) Codes Zapped Window | (8) Printer Error Window | 1. Border | 1. Border 2. Text | 2. Printer port name 3. N/A | 3. Error message 4. N/A | 4. Help text 5. N/A | 5. Help text hilight 6. N/A | 6. N/A 7. N/A | 7. N/A | ================================================================ (C) Copyright 1990 Morton Utilities, Morton Intl. Page 27 +--------------------------------------------------------------+ | Appendix D - Special Keys Table | +--------------------------------------------------------------+ This appendix outlines the codes needed to use special keys in the "String Prefix", "String Suffix", "Code Prefix", "Code Suffix", and "Code Delimeter". Special keys can also be used when defining keyboard macros instead of printer options. See section entitled "Keyboard Setup" in "Using The PMF Editor" for details. The table on the following page lists the special keys on the left and the codes needed to define them on the right. For example, to define "F1" and "Enter", you would use "0,59,13". (C) Copyright 1990 Morton Utilities, Morton Intl. Page 28 SPECIAL KEYS TABLE ================================================================ Key Dec | Key Dec | Key Dec ---------------------------------------------------------------- Backspace 8 | Ctrl-F1 0,94 | Alt-L 0,38 Tab 9 | Ctrl-F2 0,95 | Alt-Z 0,44 Enter 13 | Ctrl-F3 0,96 | Alt-X 0,45 Escape 27 | Ctrl-F4 0,97 | Alt-C 0,46 Ctrl-A 1 | Ctrl-F5 0,98 | Alt-V 0,47 Ctrl-B 2 | Ctrl-F6 0,99 | Alt-B 0,48 Ctrl-C 3 | Ctrl-F7 0,100 | Alt-N 0,49 Ctrl-D 4 | Ctrl-F8 0,101 | Alt-M 0,50 Ctrl-E 5 | Ctrl-F9 0,102 | NUL (0) 0,3 Ctrl-F 6 | Ctrl-F10 0,103 | Shift-Tab 0,15 Ctrl-G 7 | Alt-F1 0,104 | Home 0,71 Ctrl-H 8 | Alt-F2 0,105 | UpArrow 0,72 Ctrl-I 9 | Alt-F3 0,106 | PgUp 0,73 Ctrl-J 10 | Alt-F4 0,107 | LeftArrow 0,75 Ctrl-K 11 | Alt-F5 0,108 | RightArrow 0,77 Ctrl-L 12 | Alt-F6 0,109 | End 0,79 Ctrl-M 13 | Alt-F7 0,110 | DownArrow 0,80 Ctrl-N 14 | Alt-F8 0,111 | PgDn 0,81 Ctrl-O 15 | Alt-F9 0,112 | Insert 0,82 Ctrl-P 16 | Alt-F10 0,113 | Delete 0,83 Ctrl-Q 17 | Alt-1 0,120 | Ctrl-PrtSc 0,114 Ctrl-R 18 | Alt-2 0,121 | Ctrl-LtArrow 0,115 Ctrl-S 19 | Alt-3 0,122 | Ctrl-RtArrow 0,116 Ctrl-T 20 | Alt-4 0,123 | Ctrl-End 0,117 Ctrl-U 21 | Alt-5 0,124 | Ctrl-PgDn 0,118 Ctrl-V 22 | Alt-6 0,125 | Ctrl-Home 0,119 Ctrl-W 23 | Alt-7 0,126 | Ctrl-PgUp 0,132 Ctrl-X 24 | Alt-8 0,127 | F11 0,133 Ctrl-Y 25 | Alt-9 0,128 | F12 0,134 Ctrl-Z 26 | Alt-0 0,129 | Shift-F11 0,135 F1 0,59 | Alt-Hyphen 0,130 | Shift-F12 0,136 F2 0,60 | Alt-= 0,131 | Ctrl-F11 0,137 F3 0,61 | Alt-Q 0,16 | Ctrl-F12 0,138 F4 0,62 | Alt-W 0,17 | Alt-F11 0,139 F5 0,63 | Alt-E 0,18 | Alt-F12 0,140 F6 0,64 | Alt-R 0,19 | F7 0,65 | Alt-T 0,20 | F8 0,66 | Alt-Y 0,21 | F9 0,67 | Alt-U 0,22 | F10 0,68 | Alt-I 0,23 | Shift-F1 0,84 | Alt-O 0,24 | Shift-F2 0,85 | Alt-P 0,25 | Shift-F3 0,86 | A61 | Alt-Q 0,16 | | 4. ains ts3q,138t| Alt-U 19 | F9 . ains 5s3q,138t| Alt-I 4 | F10. ains 6s3q,138t| Alt-Hyp 6 | Shift-F1 7 0,99 | Alt-= 7 | Shift-F2 8 0,99 | Alt-Q 8 | Shift-F3 9 0,99 | Alt-W 10 6 Shift-F1 0 0,99 | Alt-E 11 7 ================================================================