home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
batutl
/
ben250.arc
/
BENDEMO.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-01-04
|
3KB
|
100 lines
ECHO OFF
REM THIS BATCH FILE ASSUMES THAT YOU GOT
REM DOS VERSION 3.3 OR HIGHER. PLEASE
REM CHANGE THE COMMAND CALL TO COMMAND/C
REM IF YOU HAVE A LOWER DOS VERSION.
REM ALSO YOU MUST HAVE ANSI TO RUN THIS.
CLS
REM THIS COMMAND IS USED TO SAVE ENVIRONMENT SPACE.
PATH>$RMBRTMP.BAT
PATH;
REM THIS IS THE START OF THE PROGRAM:
BEN T BENDEMO.DA1
CALL BENBAT
Set USERNAME=%BEN%
BEN BOX 1 1 80 25 0 1 0 G BOX 1 1 80 25 0 7 0 G GOTOXY 1 12 COLORNOW 0 7
CALL BENBAT
ECHO %USERNAME%, please press the G key to go on with our demo.
BEN ASK G MENU BEN 8 Sidekick Plus Directory Scrolling Around Enhanced ECHO EGA/VGA Mode Boxing Around User Input Sound Quit
If errorlevel 8 goto quit
If errorlevel 7 goto sound
If errorlevel 6 goto userin
If errorlevel 5 goto boxing
If errorlevel 4 goto egavga
If errorlevel 3 goto enhec
If errorlevel 2 goto scrollaround
If errorlevel 1 goto skp
Goto quit
:Ok
BEN MENU BEN 8 Sidekick Plus Directory Scrolling Around Enhanced ECHO EGA/VGA Mode Boxing Around User Input Sound Quit
If errorlevel 8 goto quit
If errorlevel 7 goto sound
If errorlevel 6 goto userin
If errorlevel 5 goto boxing
If errorlevel 4 goto egavga
If errorlevel 3 goto enhec
If errorlevel 2 goto scrollaround
If errorlevel 1 goto skp
Goto quit
:Skp
BEN BOX 1 1 80 25 7 1 0 G GOTOXY 1 9 COLORNOW 15 1
CALL BENBAT
ECHO %USERNAME%, you can now produce quality user-interactive batch files!
BEN WRITEC 15 1 8 Just try our SIDEKICK PLUS STYLE DIRECTORY first!
BEN GOTOXY 15 15 WRITE 7 1 6 Please enter a pathname (Eg. C:\TELECOM\MODEM\): Gotoxy 16 16 INLINE
CALL BENBAT
BEN DIRDISP %BEN%*.* F
CALL BENBAT
BEN WRITEC 15 1 1 You had just selected the file %BEN%. GOTOXY 24 25
BEN WRITE 7 1 7 PRESS ANY KEY TO RETURN TO MENU INKEY BOX 1 1 80 25 7 7 0 G
Goto Ok
:Scrollaround
BEN T BENDEMO.DA2
Goto Ok
:Enhec
BEN T BENDEMO.DA6
Goto Ok
:EGAVGA
BEN EGAVGA ON
If errorlevel 1 goto presentegavga
BEN BOX 12 12 68 14 0 7 5 G GOTOXY 14 13 WRITE 0 7 10 Sorry! But you don't have EGA or VGA card installed! DELAY 3000
Goto ok
:Presentegavga
BEN T BENDEMO.DA5
Goto ok
:Sound
BEN T BENDEMO.DA3
Goto ok
:Boxing
BEN T BENDEMO.DA4
Goto Ok
:Userin
BEN BOX 1 1 80 25 15 1 1 G GOTOXY 1 11 COLORNOW 15 1
CALL BENBAT
ECHO │ BEN is also very user interactive too.
ECHO │
ECHO │ Just the menu that led you here is an example already.
BEN GOTOXY 25 15 WRITE 7 1 4 Enter your favourite color: INLINE
CALL BENBAT
SET COLOR=%BEN%
BEN GOTOXY 25 17 WRITE 7 1 4 Enter your favourite animal: INLINE
CALL BENBAT
BEN GOTOXY 27 19
ECHO %USERNAME% loves %COLOR% %BEN%.
ECHO │ That's an example of the user inputting facility.
SET COLOR=
ECHO │ Here's another one: Press any key to continue.
BEN INKEY
GOTO OK
:Quit
REM THE FOLLOWING IS THE CLEANUP ROUTINES.
BEN ATTRIB 7 0 COLORNOW 7 0 CURSOR ON
Call BENBAT
Del BENBAT.BAT
Call $RMBRTMP
DEL $RMBRTMP.BAT
ECHO Thank you for taking your
ECHO time to evaluate our demo.
Set BEN=
Set USERNAME=