USING CUSTOM MENUS One of the most powerful new features in Q&A 4.0 is the ability to create custom menus. You now can create menus that can be viewed from any place in the product at the touch of a button. You can add to or replace any individual Q&A menu, or replace all Q&A menus with a complete structure of your own. This note is designed to give a step-by-step tutorial for creating custom menus. The major goals of this document are to help you understand which type of menu is best for your needs, and how to implement that type of menu into your Q&A system. This document assumes that you are familiar with Q&A's menus and can create macros. MENUS AND MACROS Underneath all their power, menus are simply another way to execute macros; selecting an option on a custom menu executes a macro connected with the menu selection. You can run macros as options on custom menus or by selecting them from Q&A's built-in macro list. To use the built-in list, press [Alt-F2] from any screen to display an alphabetized pick list of all macros in the current macro file. To execute a macro, highlight its name and then press [Enter]. CREATING A POP-UP MENU Q&A's built-in macro list shows all of your macros. On the other hand, a pop-up menu displays only a selected group of macros, and allows you to control the order in which they are displayed. 1. Define all the macros that will appear on the menu and test them to see that they work. For example, you might create a group of macros which type general introductions and conclusions to your business letters. 2. Press [Shift-F2] for the Macro Menu. Select M - Create menu. Highlight --- New menu --- and press [Enter]. 3. Create the menu itself using the steps detailed on pages 101-103 of the APT manual. Menu Name should not be the name of a Q&A menu. Display for pop-up menus will often be overlay rather than full screen. Status should be active. Menu Returns should be set to NO. On Escape Show Menu should be left blank. Menu Title and Items 1-9 are the text you will see on the custom menu. If an Item is capitalized then it can be selected from the menu by pressing the first letter of the Item. Consequently, you should start each Item with a different letter. Press [F2] at any time to preview this menu. Macro Name should be the names of the macros corresponding to the items on the left. 4. Press [F10] and then [Enter] to save the menu to the current macro file. Q & A Application Note Rev. 6/92 #2011 Page 1 of 6 Using Custom Menus (con't) 5. While the Macro menu is still on the screen, select Define Macro. 6. Press the keystroke that you want to use to display the pop-up menu (e.g. [Alt-M]). 7. As soon as the macro recording light appears in the lower right corner of the screen press [Shift-F2] to end the macro definition. 8. The macro Options screen should be set as follows: Macro Name can be any name you want. Show Screen should be set to YES. End with Menu should be the Menu Name of the menu you just created. Press [Alt-F7] for a list of menu names and select the correct one. 9. Press [F10] and then [Enter] to save the macro to the macro file. 10. Press the macro keystroke and you should see your pop-up menu. Select an item from the menu or press [Esc] from the menu and it will disappear. CREATING A REPLACEMENT MENU Another way to use custom menus is to remove and rearrange items on Q&A's own menus. For example, you may want to restrict users from accidentally using File Remove or Design File. This type of custom menu is called a replacement menu. 1. Press [Shift-F2] for the Macro Menu. Select M - Create menu. Highlight --- New menu --- and press [Enter]. 2. The Application Menu Options should be set as follows: Menu Name should be the name of the Q&A menu you want to replace. Press [Alt-F7] to see a list of all Q&A menu names. To replace the File Menu just select File Menu from this list. Display for replacement menus will always be full screen. Be aware that replacement menus will not be displayed like the menus they are replacing. Q&A menus are tiled across the screen while replacement menus cover the screen. If you replace the File Menu you will not be able to see the Q&A Main Menu "behind" it. Status should be active. Menu Returns should be set to NO. On Escape Show Menu should be left blank. Menu Title can be anything. Items 1-9 and Macro Names can be set up any way that you desire. Below is an example that restricts access for the File Menu, rearranges the remaining options, and adds a new one: Item 1: Add Records Macro Name: a Item 2: New Clients Macro Name: Add New Clients Item 3: Search Files Macro Name: s Item 4: Print Macro Name: p Item 5: Copy Macro Name: c Item 6: Macro Name: Item 7: Update Files Macro Name: m Q & A Application Note Rev. 6/92 #2011 Page 2 of 5 Using Custom Menus (con't) Note: Because we are replacing a Q&A menu, our replacement menu can access any of the options from the menu we are replacing. In place of the Macro Name, type the letter that selects the option on the original Q&A menu. In the example above, Items 1, 3, 4, 5, and 7 use this kind of selection. Macros that appear as selections on replacement menus, such as Add New Clients, must be defined to start from the menu that is being replaced, and they must begin by selecting an option from that Q&A menu. For example, Add New Clients was defined from the File Menu and the first thing it does is select Add Data. Because there are no options that select Design File, or Remove those functions are not usable. 3. Press [F10] and then [Enter] to save the menu to the current macro file. 4. Move to the File Menu and you should see your replacement menu. Replacement menus offer many new capabilities, but they do have several limitations. You are locked into the existing Q&A menu structure. You may exclude certain menu choices and even exclude some menus altogether, but you cannot add any new menus. You may add items to existing Q&A menus, but you are limited to nine total items per menu. These limitations are all overcome by the next type of custom menu, the free-standing menu structure. CREATING A FREE STANDING MENU STRUCTURE A free-standing menu structure is a set of custom menus that are connected into a tree-like structure. They allow a custom menu to call up other custom menus. Because your structure is not attached to the Q&A Menu structure you can add as many menus as are necessary. This effectively eliminates the problem of only nine selections per menu because you can simply add more menus any time you need. Menu structures offer the most flexibility in terms of number of menus allowed and organization of macros, but they are by far the most complex. Consequently we recommend that you become certain that you need a menu structure and if so, you follow all of these steps carefully. 1. We recommend that you plan your menu structure on paper before you begin. Decide how many menus there will be and what options each will have. For the top menu of your menu structure follow steps 2 through 12 below, then follow steps 2 through 4 for each of the sub-menus in your menu structure. 2. Press [Shift-F2] for the Macro Menu. Select M - Create menu. Highlight --- New menu --- and press [Enter]. 3. The Application Menu Options should be set as follows: Menu Name must not be the name of a Q&A menu. Display for free-standing menus will always be full screen. Status should be active. Q & A Application Note Rev. 6/92 #2011 Page 3 of 6 Using Custom Menus (con't) Menu Returns should be set to YES. Menu Returns tells Q&A to return to the current menu when finished with the macros that are selected from this menu. For example, if a menu selection takes the user from the custom menu into add data, and the user then presses [Shift-F10] to save the last record and exit, a YES setting for Menu Returns will assure that the user sees the custom menu and NOT the File Menu. On Escape Show Menu should contain the name of the custom menu you want displayed when the user presses [Esc] from the current menu. This option gives the menus their structure. It can connect the menus in a hierarchy or tree-like fashion. The following diagram illustrates how On Escape Show Menu builds a structured menu system by controlling which menu will be displayed at which time. A Sample structure: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Bob's Menu ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ÄÄÄÄÄÄÄÄÄÄÄÄ ³ ÚÄÄ>³ Documents Menu ³ On Escape ³ Documents ³ÄÄÄÙ ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³ on the ³ Data Menu ³ÄÄÄ¿ ³ Delinquent Note ³ Documents ³ ³ ³ ³ New Customer ³ Menu is set ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ Write Memo ³ to Bob's ³ ³ Blank Document ³ Menu. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÀÄÄ>³ Data Menu ³ On Escape ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³ on the Data ³ Add Invoice ³ Menu is also ³ Add Customer ³ set to Bob's ÚÄÄij Inventory Rpts ³ Menu. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÀÄÄ>³ Inventory Rpts ³ On Escape ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³ here is set ³ Current Stock ³ to the Data ³ Todays Sales ³ Menu. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ With these settings, pressing [Esc] from a sub-menu takes you back to the menu above it. You should leave the On Escape setting for your top menu blank because it has no custom menus above it. Menu Title can be anything. To eliminate ambiguity, the title should be different for each menu in the structure. Items 1-9 and Macro Names can be set up any way that you desire. To create an option on a custom menu which displays a sub-menu, enter the name of the sub-menu as the Macro Name for the appropriate item. For example, the items on Bob's Menu in the sample structure could be defined as follows: Item 1: Documents Macro Name: Documents Menu Item 2: Data Menu Macro Name: Data Menu Q & A Application Note Rev. 6/92 #2011 Page 4 of 6 Using Custom Menus (con't) Macro names are entered as before. All macros that appear on the free-standing menu structure must be designed to begin at the Q&A Main Menu. Unlike replacement menus, all items must be either macro names or menu names. Keystroke executers will not work properly on menu structures. 4. Press [F10] and then [Enter] to save the menu to the current macro file. 5. For the top menu of your menu structure, you need to create a macro that will display the menu. This macro provides access to your free-standing menu structure. 6. Press [Shift-F2] and select Define Macro. Press the keystroke that you want to use to display the top menu of the structure. The keystroke must be an alternate letter A-Z (e.g. [Alt-P]). 7. As soon as the macro recording light appears in the lower right corner of the screen press [Shift-F2] to end the macro definition. 8. The macro Options screen should be set as follows: Macro Name can be any name you want. Show Screen should be set to YES. End with Menu should be the Menu Name of the top menu of your menu structure. Press [Alt-F7] to choose it from a list of menu names. 9. Press [F10] and then [Enter] to save the macro to the macro file. 10. Select Utilities from the Q&A Main Menu. Select Set Alternate Programs from the Utilities Menu. 11. On the line Alternate Program 1, type the keystroke identifier of the macro, as shown. Also type a Menu Selection on the corresponding line. Press F10 to save the Alternate Program screen. Alternate program 1: Alt-P Menu Selection.....: More Menus 12. From the Q&A Main Menu choose the new alternate program selection. You should see the top menu of your free-standing menu structure. Press [Esc] from the top level and you should see the Q&A Main Menu. CREATING A REPLACEMENT MENU STRUCTURE The last type of menu is the replacement menu structure. This type of menu is designed to completely replace all of the Q&A menus. It is useful for applications developers or other users who want to completely control the functionality of Q&A. With a replacement menu structure, none of the menu choices are available directly. Every function must be accessed using a macro. If you are creating a replacement menu structure, you must be sure that all macros function properly from each menu, and that the menus are connected in the correct fashion. 1. Create a free-standing menu structure as outlined in this tutorial. Only after the free-standing menu structure has been fully tested and all options work properly should you continue to the next step. Q & A Application Note Rev. 6/92 #2011 Page 5 of 6 Using Custom Menus (con't) 2. Press [Shift-F2] for the Macro Menu. Select M - Create menu. Highlight the menu name of the top of your menu structure and press [Enter]. 3. On the Menu Name line press [Alt-F7] and select Q&A Main Menu. This menu will now replace the Q&A Main Menu. 4. Add an item to this menu that looks like the following: Item 9: Exit Q&A Macro Name: x Without this item, the user would not be able to exit Q&A without clearing the macros, or rebooting the machine. 4. Press [F10] and then [Enter] to save the menu to the current macro file. The user of this system will automatically be placed into this menu structure when they start Q&A. Pressing [Esc] from the top menu of the replacement menu structure will do nothing. If you have developed a replacement menu structure and realize that a mistake was made, you can back-up to solve the problem. Press [Shift-F2] for the Macro Menu, select Create Menu and then select Q&A Main Menu. Change the Menu Name back to the old name. Press [F10] to save the menu then [Enter] to write the change to the macro file. If you have problems with creating or working with any type of custom menus you should reread and carefully follow the steps in this document again. If you are still having problems, you should call the Q&A Product Support Department. REMINDERS 1. You should not combine replacement menus with free-standing menus into one Q&A application. 2. Macros on a pop-up menu should be designed to start from the screen on which the pop-up menu is displayed. Macros on a replacement menu should be designed to start from the Q&A menu that is being replaced. Macros on a free-standing menu structure or a replacement menu structure should be designed to start from the Q&A Main Menu. 3. When you refer to menus while defining other menus or macros, use the Menu Name, not the Menu Title. Q & A Application Note Rev. 6/92 #2011 Page 6 of 6