home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
menuing
/
smmenu.zip
/
DEMOMENU.MNU
< prev
next >
Wrap
Text File
|
1992-12-05
|
5KB
|
283 lines
;
; Demo of SUPRMENU
;
*MAIN
SUPRMENU Demonstration
#E,Exit to DOS
!EXIT
#C,SUPRMENU Commands
!MENU,COMMANDS
#D,SUPRMENU Documentation
!MENU,DOCS
#N,Network Utilities
!MENU,NETUTIL
#,Logout (Password=PASS)
^PASS
!LOGOUT
#,Reboot (Password=PASS)
^pass
!CHOICE,1,WARM,COLD,Type
!SKIPIF,1,WARM
!REBOOT,C
!REBOOT,W
#S,Default Screen Saver
IF EXIST SAVER2.EXE SAVER2
IF NOT EXIST SAVER2.EXE SAVER
#R,Run a DOS command
!SUBMENU,1,DOSCMD
!SKIPIF,1,PROMPT,2
!ASK,2,Parameters for %1
!SKIPNOT,1,PROMPT,1
!ASK,2,Enter a new string for the PROMPT
cls
%1 %2
pause
; Submenu definition for DOS commands
*DOSCMD
DOS Commands
List a directory=DIR
Memory Contents=MEM
Check a Disk=CHKDSK
Change DOS Prompt=PROMPT
;
; Selections to play with SUPRMENU commands
;
*COMMANDS,,2
SUPRMENU Commands
#A,!ASK Command
!ASK,1,Enter something
cls
Echo You entered: %1
pause
#C,!CHOICE Command
!CHOICE,1,YES,NO,MAYBE,What is your choice?
cls
echo You said %1
!SKIPNOT,1,MAYBE
Echo You shouldn't be so indecisive!
!SKIPIF,1,MAYBE
Echo You sure know your own mind!
!SKIPNOT,1,NO
Echo But you shouldn't be so negative!
pause
#S,!SUBMENU Command
!MSG,This is a message from !MSG
!SUBMENU,1,Choices
cls
echo You choose: %1
pause
#G,!GETENV Command
!GETENV,1,COMSPEC
!GETENV,2,MENURUN
cls
echo COMSPEC=%1
echo MENURUN=%2
pause
#F,!FILE Command
!MSG,Select A File to TYPE
!FILE,1,*.*
cls
dir %1 /p
TYPE %1
pause
#P,Password Protection (PASS)
^PASS
cls
ECHO You entered the magic word!!!!
pause
#W,WHOAMI
REM ───────[ Your Commands Start Here ]────────────
CLS
Echo ╔═══════════════════════════════════════════════╗
Echo ║ Contents of the SUPRMENU-produced BAT file ║
Echo ╚═══════════════════════════════════════════════╝
ECHO
TYPE %0
PAUSE
REM ───────[ Your Commands End Here ]────────────
#K,!SKIP commands
!MENU,SKIPCMDS
#S,Show the DEMOMNU.MNU file
CLS
!ASK,1,Name of file list program (e.g. LIST)
!SKIPIF,1,,QUIT
%1 DEMOMENU.MNU
*SKIPCMDS,COMMANDS,8
SKIP Commands
#1,1. SKIPIF with null value
CLS
!ASK,1,Enter value (could be null)
!SKIPIF,1,
ECHO Was not a null value
!SKIPNOT,1,
ECHO Was a null value
pause
#2,2. SKIPIF with increment of 3
CLS
!CHOICE,1,YES,NO,Skip 3 commands ?
!SKIPIF,1,YES,3
ECHO Command 1
ECHO Command 2
ECHO Command 3
ECHO Command 4 - Only one if you skipped
pause
#3,3. SKIPIF with END
CLS
!CHOICE,1,YES,NO,Skip to END
ECHO If you chose YES, this is the only line displayed.
!SKIPIF,1,YES,END
ECHO This line is after !CHOICE - #1
ECHO This line is after !CHOICE - #2
ECHO This line is after !CHOICE - #3
ECHO This line is after !CHOICE - #4
pause
#4,4. SKIPIF with EXIT
CLS
!CHOICE,1,YES,NO,Exit This?
!SKIPIF,1,YES,QUIT
ECHO I didn't quit
ECHO ....No I didn't
pause
#5,5. SKIP 2 lines if null value
CLS
!MSG,Null value skips 2 cmds
!SUBMENU,1,NULLVAL
!SKIPIF,1,,2
ECHO Command 1
ECHO Command 2
ECHO Command 3
ECHO Command 4
pause
#6,6. Abort if null value
CLS
!ASK,1,Enter value (Null value terminates)
!SKIPIF,1,,QUIT
ECHO You entered: %1
pause
*NULLVAL
Pick value
NULL=
NONNULL=Non-null
; Submenu for above
*CHOICES
Choose One
Vanilla=Vanilla Ice Cream
Chocolate=Yecch! Chocolate
Strawberry=Yes, Berry Good!
Blueberry=Oh, I'm So Blue
Peach=Peachy Keen
Banana=In Your Ear!
Mint=Pepper or Spear?
*DOCS,,3
SUPRMENU Documentation
#P,Print the documentation
!CHOICE,1,LPT1:,LPT2:,Which Printer?
COPY SUPRMENU.PRN %1 >NUL
#L,List the documentation
CLS
!ASK,1,Name of file list program (e.g. LIST)
!SKIPIF,1,,QUIT
%1 SUPRMENU.PRN
#D,Directory of SUPRMENU
CLS
!SUBMENU,1,LISTTYPE
DIR %1
PAUSE
; Submenu for above
*LISTTYPE
Type of DIR Listing
Wide=/W
Pause=/P
Wide & Pause=/W/P
;
; Network Utilities Menu
;
*NETUTIL,,4
Network Utilities
#P,Print Manager
PCONSOLE
#S,System Configuration
^supervisor
SYSCON
#F,File Manager
FILER
#E,SEssion Manager
SESSION
#Q,Queue Manager
QUEUE