| United States-English |
|
|
|
![]() |
HP 9000 Networking: Supervising the Network > Chapter 6 Creating MenusUsing the NMENU Commands |
|
Menu programs use two types of commands: organizational and control. The following sections describe these commands and their options. Organizational commands establish the content and organization of the menus the user sees on the screen. Use these commands to determine what the menus look like. Table 6-1 gives an overview of the organizational commands. Detailed information about each command follows the table. Table 6-1 NMENU Organizational Commands
Indicates a new window definition within your menu file.
Replace menu_number with the number you want to assign to this menu. Menus are called and displayed by their number. A menu number can be any number from 1 through 255. Each menu within a source file must be assigned a unique number, but the number sequence doesn't matter. Replace menu_name with the title you want to appear at the top of the menu. Menu names can be a maximum of 40 characters long. The first menu defined in the source file is always the first menu displayed, no matter what number is assigned to it. Subsequent menus are referenced by their numbers, no matter what order they appear in the .SRC file. For example, if you have defined three menus and assigned them numbers 1, 2, and 5, and menu 5 is the first menu in the source file, menu 5 is displayed first. Menus 1 and 2 are referenced in control commands and displayed depending upon user selection. Indicates an option in the menu.
Replace item_name with the list item you want to appear in the menu. The maximum length for an item is 40 characters. Replace option with one or more of the options shown in Table 22. Separate multiple options with a space. Enclose all options for a single ITEM within a single set of braces. These options provide you with better control of menu execution. You determine how memory is used, which directory the user remains in, and what information is presented to those users. Table 6-2 ITEM Command Options
List items appear on the menu in the same order as they appear in the source file. They are not displayed in alphabetical order. Each item is automatically assigned an alphabetic selection character. If you want to assign a different character, place a carat (^) and the character you want in front of the item name (no spaces).
If you assign any selection letters, you should assign a letter to all menu list items. Otherwise an item may be automatically assigned a letter you assigned previously. Control commands tell NMENU how to perform an action, such as displaying a submenu or user prompt, performing a DOS function, or starting an application. You also use these commands to tell the menu program how to process information and execute commands. Table 6-3 gives an overview of the control commands. Detailed information about each command follows the table. Table 6-3 NMENU Control Commands
Instructs NMENU to perform the command that follows EXEC.
Replace command with the command required to execute the ITEM. This could be the name of an executable file, a DOS or NetWare command, or one of the options associated with EXEC. The EXEC options are described in Table 6-4. Table 6-4 EXEC Command Options
EXEC must follow the ITEM to which it applies. It must also follow other control commands needed by ITEM. Instructs NMENU to execute a separate menu file.
Replace filename with the name of another NMENU program. If you have several menu programs created with the .DAT extension, use this command to call another menu program from the active menu program. LOAD always calls menus by their filename, not by number. Use this command when you have multiple menu programs defined. Although you can define up to 255 menus per source file, smaller separate files are easier to manage and update. The NMENU file being loaded must be in the current directory, or you must have a search path to the file defined. Instructs NMENU to execute a submenu defined within the same file. Include SHOW commands to identify the submenu to be displayed when an item is selected from a menu. SHOW commands always use menu numbers, not titles. If you have a menu with items listing categories of applications such as "Word Processing" and "Spreadsheets," each ITEM has the following SHOW commands to call up the appropriate submenus for those categories:
To continue this example, if menu "3,Word Processing" is a list of available word processing programs needed by both Sales and Accounting, and each group has its own menus defined, the programs can "share" that screen and the screen's calls to execute the applications. The GETx commands provide access to user input. You can request or require user input. You can even store user input for future use. Each variation of the GETx command uses the same parameters to control what the user sees and does. Pay close attention to the use of spaces, commas, and braces { }.
Replace x with the letter "O," "R," or "P."
Replace prompt with the text (instructions) to be displayed to the user (40 characters maximum). For example: "Enter your Password." Prepend is a value added to the beginning of the user response. A space is usually required in the first GETx command to separate it from the command issued in its associated EXEC command. Replace length with the maximum number of characters the user can enter. This parameter is required. For example, if you use GETR for a phone number, limit the length to 11 characters to match the field length for the phone number. Or if you want a state or country abbreviation entered, limit the length to two characters. Replace prefill with a default response displayed with the prompt. The user can accept the default, change the response by typing over the default, or cancel selection of the item. Prefill cannot be longer than the specified length. The prefill parameter is optional. If you do not want to include a default response, enter the two commas together. (See the GETx examples on the following page.) Append is the value added to the end of the user response. If no value is needed, enter braces with a blank space between them.
Following are some general guidelines on the use of the GETx commands.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||