Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 Networking: Supervising the Network > Chapter 6 Creating Menus

Getting Acquainted with NMENU

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Since the sole function of NMENU is to cause a scripted file to execute, there is little to learn about NMENU.BAT except its syntax. The command is followed by the menu filename.

NMENU Syntax

nmenu filename

Replace filename with the menu filename.

What Menus Look Like

Figure 6-1 shows the display created by a single-window menu with only three options. Whether a menu displays one or more windows, the top and bottom bars of the screen remain the same.

The top bar always displays the NMENU version number on the left and the day, date, and time on the right. The bottom bar displays the available options.

Figure 6-1 A Single-Window Menu

NMENU utilityillustratedA Single-Window Menu

When you create menus with multiple windows, the windows cascade from left to right. Window sizing is automatically determined by the content of each window.

What Makes Menus Work

You create menu files with a text editor and save the file with an .SRC extension. Then you use the MENUMAKE program to compile the file. It is given a .DAT extension and, as a compiled file, is no longer editable. Any edits must be made to the .SRC file and then the .SRC file must be recompiled.

Elements of a Menu

There are three primary elements to every menu: MENU, ITEM, and EXEC. As these elements are expanded and repeated, controlled options are displayed within each window.

Figure 6-2 shows the .SRC file used to create the menu in Figure 6-1. This file shows how these three elements are used. Details about these elements and their options are covered later in the chapter.

Figure 6-2 Primary Elements of a Menu

Primary Elements of a Menu
  • Element 1: MENU

    MENU specifies a window within the menu file. It includes a menu number and a menu name. The menu name is the title bar for the menu.

  • Element 2: ITEM

    ITEM includes the text the user will see. It is given an indicator letter by default, or you can determine the character to precede it. Each option to be displayed in the window must be preceded by the word ITEM.

    Some options are available for the ITEM line; these options are discussed in "ITEM" in this chapter.

  • Element 3: EXEC

    EXEC is the primary command for the third element. In the menu file shown in Figure 6-2, EXEC issues three separate commands: a directory listing, a display of the current version of DOS running, and a command to exit the menu.

Combining the Elements

Figure 6-3 illustrates a menu with 10 windows, created by including 10 MENU commands in the same file. Each window is automatically sized and cascaded across the screen.

Figure 6-3 A Multiple-Window Menu

A Multiple-Window Menu

Menu Creation Steps

There are generally six steps to follow when considering a new menu. The relationship among steps is shown in Figure 6-4.

Figure 6-4 Charting the Steps in Creating a Menu

NMENU utilitysteps in creating menusNMENU utilityplanningCharting the Steps in Creating a Menu
Procedure

Each step in the flowchart is explained next.

  1. Plan and design your menu. Before starting, answer the following questions:

    • Who is it for?

    • What do the users need access to?

    • Should they have access to a NetWare prompt?

    • Should they be forced to log out when exiting?

    • How complex is the menu? Will it need to be in multiple files?

  2. Use a text editor to create your menu file with an .SRC extension.

  3. Compile the .SRC file with the MENUMAKE program. This will create a .DAT version of the file.

    The results of any errors occurring during the compile process, including detailed error messages per line of script, are displayed on your screen. Fix the errors in the .SRC version of the file according to the error messages, and then recompile.

    When you have eliminated all the errors, continue with Step 4.

  4. Run NMENU filename.dat to verify that it does what you expect.

  5. Change the program if needed, as described in Step 3, and then repeat Step 4. When Step 4 is successful, go on to Step 6.

  6. Provide access to the intended users by placing the .DAT file in an appropriate directory and granting sufficient rights to the users.

    Information on placement of files and required rights is in "Making Menus Work" in this chapter.

Following these six steps can help you learn how to use the scripting language and how to manage the menu files you create.

Use of the NMENU program is almost unlimited. When considering the uses for menus, remember that they can be as simple as presenting available application programs (see Figure 6-5).

Figure 6-5 Example of a Simple Menu

NMENU utilityexamplesNMENU utilitysimple menu exampleExample of a Simple Menu

Menus also can be more complex, such as guiding data entry for cataloging (see Figure 6-6).

Figure 6-6 Example of a More Complex Menu

NMENU utilityexamplesNMENU utilitycomplex menu exampleExample of a More Complex Menu

The text used to create the four menus shown in this section (Figure 6-1, Figure 6-3, Figure 6-5, and Figure 6-6) is included in "Example Menu Programs" in this chapter.

Before you look at how these menus were created, however, you should be familiar with the guidelines for planning menus and also with the scripting language rules.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.