XTRA\MENU.DOC ·
DOC ·
2 KB ·
1988-12-01 ·
from PersonalComputing_Dec-1988
MENU.BAT is intended as a model for your own batch files using XTRA
If you are unfamiliar with batch files, these comments may help.
-----------------------------------------------------------------
ECHO OFF ; prevents DOS echoing all commands to the screen.
REM MODEL BATCH FILE FOR YOU TO BUILD ON
; DOS ignores REMarks
XTRA ; installs XTRA unless already installed.
:START ; label for DOS to search for later.
CLEAR +CYAN,WHITE ; set INK=BRIGHT CYAN,PAPER=WHITE and clear screen.
BIG 3,,8,MY OWN MENU ; row 3, centered, BIG font No.8, print text.
COLOUR +WHITE,RED,BLUE ; set INK, PAPER, and SHADOW colour.
BOX 10,,18,5,2 ; row 10, centered, 18 wide, 5 deep, double line.
PUT 11,,Fontasy ; print at row 11, centered, this text.
PUT ,,Lotus 123 ; next line down, centered.
PUT ,,Sidekick ; etc
PUT ,,Wordprocessor
PUT ,,Quit
POINT 11,,14,5 ; bright bar menu, starting at row 11, centered,
14 wide, 5 lines deep. Returns selected line
as the errorlevel.
IF ERRORLEVEL 5 GOTO QUIT ; QUIT is a label at end of batch file.
IF ERRORLEVEL 4 GOTO WORDSTAR ; if ERRORLEVEL 4 or more, then go find the
label ":WORDSTAR" and continue from there.
IF ERRORLEVEL 3 GOTO SIDEKICK
IF ERRORLEVEL 2 GOTO LOTUS
IF ERRORLEVEL 1 GOTO FONTASY
:FONTASY ; label for DOS to find
CD\FONTASY ; change directory to \FONTASY.
FONTASY ; execute the program.
CD\ ; afterwards, change to root directory.
GOTO START ; go back to START label.
:LOTUS ; same thing for LOTUS
CD\LOTUS
123
CD\
GOTO START
:SKICK
rem sidekick stuff
:WORDSTAR
rem wordstar stuff
:QUIT
CLEAR WHITE,BLACK ; change to white ink on black paper, and cls.