home *** CD-ROM | disk | FTP | other *** search
- This is a real menu setup for a command-line illiterate user who couldn't
- do anything with 4DOS (or command.com) unassisted. The most interesting
- part is the prompting for f7 (copy a file) and some of the other functions.
-
- cd d:\
- cd c:\
-
- The following two variables will position a highlighted "@" sign to
- show what was chosen last. For now, nothing has been chosen before.
-
- set lastx=0
- set lasty=0
-
- Draw the menu
-
- :start
- unset thingie tofile fromfile wtf
- cls
- drawbox 0 0 24 79 2 white on blue fill blue
- scrput 2 8 white on blue --------- Function Keys ------ ------ Shift Function Keys ------
- scrput 3 8 white on blue f1 Kings *f1 Gomoku
- scrput 5 8 white on blue f2 Show document directory *f2 Communications
- scrput 7 8 white on blue f3 Manual command *f3 First Publisher
- scrput 9 8 white on blue f4 Edit a document *f4 Shooting gallery
- scrput 11 8 white on blue f5 Mahjongg *f5 Breakout
- scrput 13 8 white on blue f6 Solitare *f6 Reset Trackball
- scrput 15 8 white on blue f7 Copy a file *f7 DB3+
- scrput 17 8 white on blue f8 Envelope on Daisy Wheel *f8 Epson printer page eject
- scrput 19 8 white on blue f9 Epson printer reset *f9 Super Fly
- scrput 21 8 white on blue f10 DOS Environment *f10 Shut down system
- iff "%lastx%" ne "0" then^scrput %lasty% %lastx% bright white on blue @^endiff
- rem drawvline 0 39 25 1 white on blue
-
- Wait for an input key, updating the time every second while waiting.
-
- :timeloop
-
- Allow for the fact that inkey moves the cursor on a timeout.
- screen 0 0
-
- scrput 1 30 white on blue %_date %_time
- inkey /w1 %%WTF
- if "%WTF%" == "" goto timeloop
-
- Got a keystroke -- figure out what it was, if anything.
-
- rem
- if %WTF% == @59 goto dof1
- if %WTF% == @60 goto dof2
- if %WTF% == @61 goto dof3
- if %WTF% == @62 goto dof4
- if %WTF% == @63 goto dof5
- if %WTF% == @64 goto dof6
- if %WTF% == @65 goto dof7
- if %WTF% == @66 goto dof8
- if %WTF% == @67 goto dof9
- if %WTF% == @68 goto dof10
- if %WTF% == @84 goto doshf1
- if %WTF% == @85 goto doshf2
- if %WTF% == @86 goto doshf3
- if %WTF% == @87 goto doshf4
- if %WTF% == @88 goto doshf5
- if %WTF% == @89 goto doshf6
- if %WTF% == @90 goto doshf7
- if %WTF% == @91 goto doshf8
- if %WTF% == @92 goto doshf9
- if %WTF% == @93 goto doshf10
- if %WTF% == @113 goto doshf10
- rem
-
- Unrecognized keystroke -- ignore.
- goto start
-
- A typical case limb for a function key, repeated many times here.
-
- :dof1
-
- Position the "@" sign for return to menu
-
- set lastx=11
- set lasty=3
-
- c:\games\kings
- goto start
-
-
-
- :dof2
- cls
- dir /4apv c:\foo\*.*
- pause
- set lastx=11
- set lasty=5
- goto start
-
-
- A function which requires further prompting:
-
- :dof3
-
- Put up the prompt just below the menu pick.
- scrput 2 27 bright yel on blue "?" will abort the command
-
- Put up the prompt wording
- scrput 8 8 white on blue Command:
-
- Put up a field of blanks to fill in
- scrput 8 16 bright yellow on blue _____________________________________________________________
-
- Position the cursor to the start of the blanks
- screen 8 16
-
- Get the prompt fill from user
- input %%thingie
- cls
-
- Check for an abort signal.
- if "%thingie%" == "?" goto start
-
- set lastx=11
- set lasty=7
- %thingie%
- pause
- goto start
-
-
- :dof4
- scrput 2 27 bright yel on blue "?" will abort the command
- scrput 10 8 white on blue Document name:
- scrput 10 22 bright yellow on blue ____________
- screen 10 22
- input %%thingie
- if "%thingie%" == "?" goto start
- set lastx=11
- set lasty=9
- cls
- rem call hdb %thingie%
- ws c:\budnick\%thingie%
- fr
- goto start
-
-
- :dof5
- scrput 12 8 white on blue Board number:
- scrput 12 21 bright yellow on blue ______
- screen 12 21
- input %%thingie
- set lastx=11
- set lasty=11
- iff "%thingie%" == "" then^c:\games\mahjongg -y -f -m -n^
- else^c:\games\mahjongg -y -f -m -n -b%thingie%^endiff
- goto start
-
-
- :dof6
- keystack "NNS1Hanny" 13 "YYY" 0 0 "x"^c:\games\solitare
- set lastx=11
- set lasty=13
- goto start
-
-
-
- This one is unusual in that it requires TWO prompts -- one for the
- input file, one for the output file.
-
- :dof7
-
- Put up the input prompt just below the menu pick, including a field of
- bright yellow blanks and position the cursor to the start of the field.
- scrput 2 27 bright yel on blue "?" will abort the command
- scrput 16 8 white on blue Copy from:
- scrput 16 18 bright yellow on blue ___________________________________________________
- screen 16 18
-
- Get the input string
- input %%fromfile
-
- Make sure the input file exists or prompt again for input file.
- if "%fromfile%" == "" goto dof7
- if "%fromfile%" == "?" goto start
- if not exist %fromfile% goto dof7
-
- Prompt for the output file.
- :doof7
- scrput 16 8 white on blue Copy to:
- scrput 16 16 bright yellow on blue ____________________________________________________
- screen 16 16
- input %%tofile
-
- Check the response
- if "%tofile%" == "?" goto start
- if "%tofile%" == "" goto doof7
- set lastx=11
- set lasty=15
- cls
- copy %fromfile% %tofile%
- pause
- goto start
-
-
- :dof8
- scrput 2 27 bright yel on blue "?" will abort the command
- scrput 18 8 white on blue Document name:
- scrput 18 22 bright yellow on blue ____________
- screen 18 22
- input %%thingie
- if "%thingie%" == "" goto dof8
- if "%thingie%" == "?" goto start
- if not exist c:\budnick\%thingie% goto dof8
- set lastx=11
- set lasty=17
- envelope c:\budnick\%thingie% /c > com2
- goto start
-
- :dof9
- pinit
- set lastx=11
- set lasty=19
- goto start
-
- Exit to DOS pick.
- :dof10
- unset wtf
- cls
- echo type HMENU at any DOS prompt to return to the main menu
- quit
-
- :doshf1
- set lastx=45
- set lasty=3
- c:\games\gomoku
- goto start
-
- :doshf2
- cls
- call tc
- set lastx=45
- set lasty=5
- goto start
-
- :doshf3
- e:
- cd e:\pub
- fp
- cd e:\
- c:
- colset 17 50 5a 03
- set lastx=45
- set lasty=7
- goto start
-
- :doshf4
- to c:\games^shoot^fr
- set lastx=45
- set lasty=9
- goto start
-
- :doshf5
- c:\games\breakout S-6
- set lastx=45
- set lasty=11
- goto start
-
- :doshf6
- trakball dos
- set lastx=45
- set lasty=13
- goto start
-
- :doshf7
- trakball dbase^to db3^dbase^fr
- set lastx=45
- set lasty=15
- goto start
-
- :doshf8
- pff
- set lastx=45
- set lasty=17
- goto start
-
- :doshf9
- pushd c:\games
- fly
- popd
- set lastx=45
- set lasty=19
- goto start
-
-
- Call alias to purge and disable disk cache.
- :doshf10
- cls
- sysdown
- quit