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 37, Figure 39, Figure 41, and Figure 42. 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 37.
Figure 43
Single-Window Menu Script
Text from the .SRC file used for the menu in Figure 41 is shown in the following figure. This menu demonstrates how submenus can be used.
Figure 44
A Simple Menu Script
The menu in Figure 42 was created from the text file in the following figure. This menu incorporates the GETR command with simple DOS functionality.
Figure 45
A More Complex Menu Script
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 46
Combining Commands in a Script
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.