Study the following examples by creating and trying them. By entering, executing, and debugging each example, you will gain the depth of understanding necessary to use the scripting language effectively. NOTE: In the following examples, indents are used to help readability; they are not required.
The examples include those script files used for the menus in Figure 42, Figure 44, Figure 46, and Figure 47. Subsequent examples show other ways of using the NMENU scripting language. This example in the following figure is the text used to create the menu in Figure 42. Figure 48
Text from the .SRC file used for the menu in Figure 46 is shown in the following figure. This menu demonstrates how submenus can be used. Figure 49
The menu in Figure 47 was created from the text file in the following figure. This menu incorporates the GETR command with simple DOS functionality. Figure 50
As this menu script shows, by combining regular DOS commands with special NMENU conventions you have a simple means of organizing data. You don't need a database program just to catalog some information. Users can accomplish more work when access to DOS and NetWare functionality is combined in the same menu. Figure 51
In Menu 14 from Example 5, the DIR command uses the same variable as the NCOPY command immediately above it. The {pause} option allows the results to be viewed as long as necessary.Example Menu Programs
Example 1: Single-Window Menu
Single-Window Menu Script
Example 2: A Simple Menu
A Simple Menu Script
Example 3: A More Complex Menu
A More Complex Menu Script
Example 4: Combining DOS and NetWare Commands
Combining Commands in a Script