These batch files were taken from the set of messages 4DOS10.zip from FIDOnet in 1994-1995. These were provided by Klaus Meinhard
, a long-time 4DOS user. They mostly correspond to 4DOS version 5.5 and predated Windows 95. They are provided here for historical and learning purposes. We have selected examples that still seem relevant for current use. Not many people running bulletin board services, for instance, and many examples came from managing messages and files on a BBS. If you wish you can download the original file
.
Warning: We cannot make any guarantee how the batch files will work on your system. You may need to edit them so that they match your setup. Use them at your own risk.
::================================================================= setlocal setdos /x-1 text|set op=%@trim[%@select[con,0,30,24,47,Options:]] Option-1 Option-2 ..... Option-99 None endtext setdos /x0 if "%op" == "option-1" (pushd c:\prog_dir^call prog_name.btm^popd) if "%op" == "option-2" (pushd c:\prog_dir^call prog_name.btm^popd) ::... if "%op" == "option-99" (pushd c:\prog_dir^call prog_name.btm^popd) endlocal^quit ::=================================================================
This menu creates a centered windown (of 24 lines by 15 characters) into which the different options appear - only 22 options will appear on the screen at one time, but it is possible to scroll through. The user then has to move the highlight up/down using the arrow keys (and/or the mouse) and press the [ENTER] key to start the choosen program.
::part one
:: Date : 01-12-'92, 23:38 Jan Vanhoof 2:292/401.3
:: modified rather heavily by flp 12/7/92
:: and even more heavily by bill jernigan 01-25-93, after
:: dozens of revisions, hundreds of cusswords and at least one
:: major dent in the computer...
:::::::::::::::::::::::::::::::the set stuff:::::::::::::::::::::::
:BEGIN
cdd c:\
::checks for a reminder file, to remind me
::of earth-shaking events of the day
if exist C:\belfry\%_date.bat call C:\belfry\%_date.bat
setlocal
set color1=bri yel on blu
set color2=bri whi on blu
[ more selections deleted ]
::this line determines how long it's been since a backup
set budate=%@eval[%@date[%_date]-%@date[%@filedate[f:\tape\reset.dat]]]
:: reset.dat is a 0-byte file created in tape drive subroutine (below)
iff %_dow eq Sun then set day=Sunday
elseiff %_dow eq Mon then set day=Monday
[ more selections deleted ]
endiff
::::::::::::::::::::::::::::::the box stuff::::::::::::::::::::::::
:TOP ::set up boxes, show time, date, memory and hd space
::this line refers to a password scheme (below)
set pw=
cls
drawbox 0 1 24 78 2 bri whi on blu zoom
drawbox 0 1 24 57 2 bri whi on blu fill bla
drawbox 0 57 24 78 2 bri whi on blu fill blu
drawhline 20 3 53 1 bri whi on bla
scrput 3 65 %color1 %day
::this is to make the date look pretty
iff %@substr[%_date,0,2] lt 10 then
set dia=%@substr[%_date,1,7]
else
set dia=%_date
endiff
scrput 4 65 %color2 %dia
::now we're ready to display some stuff first, the free
::memory - base, xms, environment and alias
scrput 7 63 %color1 Free Memory
scrput 8 62 %color2 DOS Kb
scrput 8 69 %color11 %@dosmem[k]
if %@dosmem[k] le 500 scrput 8 69 %color6 %@dosmem[k]
scrput 9 62 %color2 XMS Kb
scrput 9 67 %color11 %@xms[kc]
scrput 10 62 %color2 ENV b
scrput 10 69 %color11 %_env
scrput 11 62 %color2 ALI b
scrput 11 69 %color11 %_alias
::then the space available on each partition
scrput 13 61 %color1 Free Disk Space
scrput 14 63 %color2 C: Kb
scrput 14 66 %color11 %@diskfree[C:,kc]
iff %@diskfree[C:,k] le 3000 scrput 14 66 %color10 %@diskfree[C:,kc]
scrput 15 63 %color2 D: Kb
scrput 15 66 %color11 %@diskfree[D:,kc]
iff %@diskfree[D:,k] le 3000 scrput 15 66 %color10 %@diskfree[D:,kc]
scrput 16 63 %color2 E: Kb
scrput 16 66 %color11 %@diskfree[E:,kc]
iff %@diskfree[E:,k] le 3000 scrput 16 66 %color10 %@diskfree[E:,kc]
::next, what versions of dos and 4dos we're running...
scrput 18 60 %color1 Operating System
scrput 19 62 bri cya on blu MS-DOS %_dosver
scrput 20 63 bri cya on blu 4DOS %_4ver`F`
::::::::::::::::::::::::::::the program stuff::::::::::::::::::::::
::menu selections
scrput 2 21 bri whi on bla M A I N M E N U
scrput 3 19 bri whi on bla -=)(=-=)(=-=)(=-=)(=-
scrput 5 8 %color3 * Avagio ^scrput 5 11 %color4 A
scrput 6 8 %color3 * Binkley ^scrput 6 11 %color4 B
[ more selections deleted ]
::part two
::function key selections
scrput 5 35 %color5 F1 - Game Menu
scrput 6 35 %color5 F2 - Util Menu
[ more selections deleted ]
::minor menu selections
scrput 19 6 bri yel on bla Spades Gammon Nyet Rockford Sol
scrput 19 4 bri mag on bla 1
scrput 19 14 bri mag on bla 2
[ more selections deleted ]
::::::::::::::::::::::::::::::the reminder stuff:::::::::::::::::::
::a separate .btm file creates my reminder, and gives it
::the date of the event as a filename
if exist C:\belfry\%_date.bat goto flasher
::if no reminder, remind to backup
::if it has been more than 30 days since
::a backup, jump to a flashing display
if %budate ge 30 goto toolong
scrput 22 13 bri cya on bla It's Been %budate Days Since a Backup!
goto cont
endiff
:TOOLONG
scrput 22 13 bri red on bla It's Been Days Since a Backup!
::color6 (set above) is blinking
scrput 22 23 %color6 %budate
goto cont
:FLASHER
::this takes the first line of my reminder ("remsubj"),
::centers it and displays it at menu bottom
set col=0
set end=
set Length=%@len[%remsubj]
rem Pass "col" "left" and "right" back to caller.
set col=%@int[%@eval[%@eval[57-%length]/2]-1]
if %col LE 2 set col=2
scrput 22 %col %color6 %remsubj
:::::::::::::::the bring together and make it work stuff::::::::::::
:CONT
color %color2 border blu
screen 24 1
set choice=²
:LOOP ::ayem or pee-yem?
:: this just cuts out unwanted junk in the time display, so
::that it doesn't read something like 19:43:53
iff %@substr[%_time,0,2] eq 12 then
set tim=%@substr[%_time,0,5] PM
elseiff %@substr[%_time,0,2] GT 12 then
set tim=`%@eval[%@substr[%_time,0,2]-12]%@substr[%_time,2,3] PM `
elseiff %@substr[%_time,0,2] lt 10 then
set tim=%@substr[%_time,1,4] AM
else
set tim=%@substr[%_time,0,5] AM
endiff
::the gristmill
::this routine is constantly checking for a keystroke...
::if the keystroke is the name of a label, it runs the
::program, otherwise it just beeps and keeps doing its thing...
scrput 5 65 %color2 %tim
inkey /w0 %%choice > nul
iff "%choice"=="²" .or. "%choice"==" " then
goto loop
elseiff islabel %choice then
gosub %choice
else
beep
endiff
set choice=²
goto loop
quit
:::::::::::::::::::::::the batch subroutine stuff:::::::::::::::::::
::main selections
:A
in ava ava ^ goto feed
:B
in mail\bink runmail
[ more selections deleted ]
:Q
endlocal
cdd d:\qmodem
if exist \qmodem\downers\*.zip;*.arj;*.lzh goto gussit
goto begin
::part three
:GUSSIT
for %X in (d:\qm\downers\*.zip;*.arj) do (set zf=%@name[%X]^gosub regus)
goto begin
:REGUS
::this names a directory after the compressed file,
::decompresses it and moves it to a zip directory...
cls
md e:\%zf
gus d:\qmodem\downers\%zf e:\%zf
if exist e:\%zf\*.* move d:\qmodem\downers\%zf.* e:\zip^goto dirask
goto screwup
:DIRASK
inkey /k"yn" Would you like to go to the %zf directory? (Y/N) %%change
if "%change%"=="y" goto yep
return
:YEP
cdd %zf
cancel
:SCREWUP
screen 10 20
Echo:There's a Problem somewhere, amigo...%zf DIDN'T get unpacked...
screen 11 20
newpause Press the ANY key and check it out...
cancel
[ more selections deleted ]
:W
in word word
goto feed
::this is something i'm playing with...a help screen for the
::menu...pressing ALT and the letter of the program would bring
::up a short description of the program...
:@30
cls
screen 10 20
text
Avagio is a basic desktop publishing package which imports text
files and graphics to make flyers, etc.
endtext
screen 14 20
pause
goto top
:1 ::minor selections
in games\spades spades^goto top
[ more selections deleted ]
::the function keys
:@59 ::F1
game
:@60 ::F2
util
[ more selections deleted ]
::this calls the dialer btm that started this discussion
:@62 ::F4
call dialing
goto top
:@63 ::F5
::this calls my GIF viewer, and it is passworded...in a compiled
::(batcomp) btm file...plenty of security for my needs ...
call dirtypix
goto top
[ more selections deleted ]
@66
cdd f:\tape
tape
screen 10 20
set text=`Should I Reset the Backup Counter? ` %%reset
gosub box
inkey/k"yn" /w5 %%reset
if "%reset%"=="y" rem>f:\tape\reset.dat
goto top
[ more selections deleted ]
:.
cd\^cls^goto end
:: the end
:FEED
cls
set text=`Would you like a formfeed? `
gosub box
inkey/k"yn" /w5 %%form
if "%form%"=="y" `beep^echo [formfeed (ankh) symbol] > lpt1`
unset col left right text w
goto top
:BOX
cls %color2 border blu
set w=2
call center %text %w
drawbox 8 %left 12 %right 1 bri whi on whi fill blu shadow zoom
screen 10 %col %Text
return
:::::::::::::::::::::::::the password stuff::::::::::::::::::::::::
::insert this snippet into appropriate batch sub above and
::give it a password
:: set secret=
:: gosub pw
:: if not %pw%==%secret% `beep ^ goto stop`
:PW
set pw=
drawbox 9 17 11 50 2 %color1 fill blu zoom
beep
screen 10 20 `Enter Password: `
color blu on blu
input /w15 %%pw
color %color2 border blu
return
:STOP
beep
scrput 10 20 bli red on bla ` WRONGO -- ACCESS DENIED `
delay 3
goto top
:::::::::::::::::::::::the extraneous stuff:::::::::::::::::::
:. ::not shown on menu
goto end
:7
in brix brix1^goto top
[ still more selections deleted ]
:END
ENDLOCAL
CANCEL
:::::::::::::::::::::::::::::finis::::::::::::::::::::::