home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
DATABASE
/
DBAT110.ZIP
/
MENU2.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-01-10
|
4KB
|
141 lines
@echo off
:: *** dBAT Menu Demo #1 *** :: Turn off the echo (use @ if DOS3.3 or +)
:: ~~~~~~~~~~~~~~~~~~~~~~~~~
:: Note: This example uses ASK.EXE to get key pressed and set DOS errorlevel.
:: A major advantage of this type of menu system is that TSRs such
:: as EMULATION programs can be loaded from the menu.
:START
::c:
::cd \
:: Note: If running this batch file from another directory, you must either:
:: 1. pass the batch file's full path to dBAT, or
:: 2. change (in the batch file) to the directory that contains the
:: batch file before the line that runs dBAT
:: (because dBAT doesn't search the PATH for the batch file to read it)
dBAT %0
goto ENDdBAT
PROC dBAT
SET COLOR TO 112 && Black on White
@ 00,00 CLEAR TO 00,79 && clear top row
@ 24,00 CLEAR TO 24,79 && clear top row
@ 24,01 ?? "Select Option -or- Press Esc to exit Menu to DOS"
SET COLOR TO 15 && Bright White on Black
@ 00,30 ?? " Company - Main Menu "
SET COLOR TO 31 && Bright white on blue (for color#s COLOR.COM)
@ 01,00 TO 23,79 DOUBLE && border double line box
@ 02,01 CLEAR TO 22,78 && clear the box space
SET COLOR TO 30
@ 06,28 ?? "A...General Ledger"
@ 07,28 ?? "B...Payroll"
SET COLOR TO 29
@ 09,28 ?? "C...Lotus 123"
@ 10,28 ?? "D...Professional Write"
SET COLOR TO 27
@ 12,28 ?? "E...S/36 & PC Support Menu"
SET COLOR TO 26
@ 14,28 ?? "P...Park"
SET COLOR TO
@ 21,00
*** use following line for centering item on the screen...
*@ 02,00 ?? "012345678901234567890123456789012345678--876543210987654321098765432109876543210"
QUIT
:ENDdBAT
:RETRY
ASK/efq "" abcdefghijklmnopqrstuvwxyz123456789\27
if errorlevel 36 goto EXIT Rem Esc
if errorlevel 35 goto retry Rem 9
if errorlevel 34 goto retry Rem 8
if errorlevel 33 goto retry Rem 7
if errorlevel 32 goto retry Rem 6
if errorlevel 31 goto retry Rem 5
if errorlevel 30 goto retry Rem 4
if errorlevel 29 goto retry Rem 3
if errorlevel 28 goto retry Rem 2
if errorlevel 27 goto retry Rem 1
if errorlevel 26 goto retry Rem Z
if errorlevel 25 goto retry Rem Y
if errorlevel 24 goto retry Rem X
if errorlevel 23 goto retry Rem W
if errorlevel 22 goto retry Rem V
if errorlevel 21 goto retry Rem U
if errorlevel 20 goto retry Rem T
if errorlevel 19 goto retry Rem S
if errorlevel 18 goto retry Rem R
if errorlevel 17 goto retry Rem Q
if errorlevel 16 goto PARK Rem P
if errorlevel 15 goto retry Rem O
if errorlevel 14 goto retry Rem N
if errorlevel 13 goto retry Rem M
if errorlevel 12 goto retry Rem L
if errorlevel 11 goto retry Rem K
if errorlevel 10 goto retry Rem J
if errorlevel 9 goto retry Rem I
if errorlevel 9 goto retry Rem H
if errorlevel 7 goto retry Rem G
if errorlevel 6 goto retry Rem F
if errorlevel 5 goto PCS Rem E
if errorlevel 4 goto PW Rem D
if errorlevel 3 goto LOTUS Rem C
if errorlevel 2 goto PR Rem B
if errorlevel 1 goto GL Rem A
if errorlevel 0 goto retry
goto EXIT
:GL
:: c:
:: cd \gl
:: GL...
echo !!! You selected General Ledger !!!
pause
:: cd \
goto START
:PR
:: c:
:: cd \PR
:: PR...
echo !!! You selected Payroll !!!
pause
:: cd \
goto START
:LOTUS
:: c:
echo !!! You selected Lotus 123 !!!
pause
:: cd \123
:: 123
:: cd \
goto START
:PW
:: c:
:: cd \PW
:: PW
echo !!! You selected Professional Write !!!
pause
:: cd \
goto START
:PCS
:: c:
:: cd \PCS
:: Note: only a batch file menu system can load a TSR from the menu
:: Note: must use CALL when running a batch file to return control to here
:: call LINK36
echo !!! You selected PC Support !!!
pause
:: cd \
goto START
:PARK
cls
PARK
goto END
:EXIT
cls
:END