home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
DATABASE
/
DBAT110.ZIP
/
LBAR2.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-01-10
|
3KB
|
112 lines
@echo off
:: *** dBAT Light Bar Menu Demo #2 ***
:: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:START
::c:
::cd \
dBAT %0
goto ENDdBAT
Note: This dBAT example sets the DOS errorlevel based on the selection.
A major advantage of this type of menu system is that TSRs such
as EMULATION programs can be loaded from the menu.
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)
PROC dBAT
SET CURSOR OFF
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 95
@ 00,29 ?? " 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
SET ICOLOR TO 95
@ 06,27 PROMPT "A...General Ledger"
@ 07,27 PROMPT "B...Payroll"
@ 09,27 PROMPT "C...Lotus 123"
@ 10,27 PROMPT "D...Professional Write"
@ 12,27 PROMPT "E...S/36 & PC Support Menu"
@ 14,27 PROMPT "P...Park"
MENU TO
QUIT
*** uncomment the following line for centering...
*@ 11,00 ?? "012345678901234567890123456789012345678--876543210987654321098765432109876543210"
:ENDdBAT
cls
if errorlevel 7 goto EXIT Rem Esc
if errorlevel 6 goto PARK Rem P
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
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