![]() |
Merge - Generating Menus Using The Merge Feat |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
Solutions: A basic approach to generating menus is to use WordPerfect's Merge feature. You may prefer to construct your menus using merges if you are in a hurry and don't have time to write and test an entire menu macro. Menu merges use a single primary document that includes the menu text as well as codes for branching off to one of any number of macros. Each macro then completes the task, or calls up another menu. A secondary merge document is not required. The following example shows one approach to creating a menu list for easily accessing previously written macros. {PROMPT} MENU BOX Draw a box ENVELOPE Print an envelope LINEHOR Draw a horizontal line LINEVER Draw a vertical line Enter a macro to use:{CHAIN MACRO}{KEYBOARD}~~ The {PROMPT} code at the beginning of the document tells WordPerfect to display the text that follows. The {KEYBOARD} code tells WordPerfect to pause for keyboard entry. Simply enter your reply and press Enter. What you type takes the place of the {KEYBOARD} code when the merge operation is completed. The {CHAIN MACRO} code tells WP to start a macro as the next step. Since the {KEYBOARD} code is placed after the {CHAIN MACRO} code, your entry becomes the name of the macro to run. In the example, the menu lists the macros BOX, ENVELOPE, LINEHOR, and LINEVER. A description beside the name reminds you what the macro does. Write the menu using tab stops to indent the menu items. You can search and replace later to insert five spaces in place of the Tabs. This will create a better appearance when the menu merge is invoked. Now, save the list as MENUTEST.MRG or some other descriptive name, and clear the screen. Then, use the following steps to run the merge: 1. Press Ctrl-F9 (Opens Merge/Sort menu) 2. Press M (Selects Merge option) 3. Type in menutest.mrg and press Enter (This is the primary filename) 4. Press Enter (This is a blank as the secondary merge file). The menu list will then scroll onto the screen, and the prompt at the bottom will read "Enter a macro to use: " 5. Type one of the macro names (upper or lowercase) and press Enter. That macro will then be executed. If you want the macro to loop back to the menu, repeat the steps outlined in the key sequence above at the end of each macro. |
Answer:
Details:
Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER. |