:***************************************************************************
:
:Name: 4DUM10.BTM  (4DOS > 3.01 required)       Timestamp: 10-30-90 04:30pm
:      Copyright (c) 1990, Dick Botbyl          CIS 71571,151
:
:Description: Menu for 4Dos w/accessories & UltraVision compatible
:
:***************************************************************************

:menu
  @echo off
  setlocal
:startm
  cls
:user options  (put your preferences here)
  *set _title=4Dos User Menu
  *set _mnu1 =QuickBasic  - Programming
  *set _mnu2 =Quattro Pro - spreadsheet
  *set _mnu3 =Quicken 3   - check book
  *set _mnu4 =Multi Edit  - program editor
  *set _mnu5 =TapCi$      - CompuServe
  *set _mnu6 =Windows 3.0 - Multitasking
  *set _mnu7 =MS Word 5.0 - Word Processor
  *set _mnu8 =Drafix Cad  - Real drawing
  *set _mnu9 =Telix       - Communications
  *set _mnu0 =Reflex 2.0  - Data base
:blanker in sec
  *set _Dlay =60

:setup
  *set _Scr1 =%@eval[0]
  *set _tlen=%@eval[(%@len[%_title])/2]
  *set _ccol=%@eval[(%_columns-80)/2]
  drawbox 0 0 %@eval[%_rows-1] %@eval[%_columns-1] 1 whi on blu fill cya
  drawbox 1 1 2 2 0 cya on cya fill cya
  drawbox 5 %@eval[%_ccol+23] 20 %@eval[%_ccol+60] 2 bla on bla fill bla
  drawbox 4 %@eval[%_ccol+21] 19 %@eval[%_ccol+58] 2 bla on gre fill whi
  drawbox 4 %@eval[%_ccol+21] 6 %@eval[%_ccol+58] 2 bla on gre fill gre
  drawbox 17 %@eval[%_ccol+21] 19 %@eval[%_ccol+58] 2 bla on gre fill gre
  scrput  5 %@eval[%_ccol+40-%_tlen] bri whi on gre %_title
  scrput  7 %@eval[%_ccol+28] bri bla on whi %_mnu1
  scrput  7 %@eval[%_ccol+24] red on whi `1 -`
  scrput  8 %@eval[%_ccol+28] bri bla on whi %_mnu2
  scrput  8 %@eval[%_ccol+24] red on whi `2 -`
  scrput  9 %@eval[%_ccol+28] bri bla on whi %_mnu3
  scrput  9 %@eval[%_ccol+24] red on whi `3 -`
  scrput 10 %@eval[%_ccol+28] bri bla on whi %_mnu4
  scrput 10 %@eval[%_ccol+24] red on whi `4 -`
  scrput 11 %@eval[%_ccol+28] bri bla on whi %_mnu5
  scrput 11 %@eval[%_ccol+24] red on whi `5 -`
  scrput 12 %@eval[%_ccol+28] bri bla on whi %_mnu6
  scrput 12 %@eval[%_ccol+24] red on whi `6 -`
  scrput 13 %@eval[%_ccol+28] bri bla on whi %_mnu7
  scrput 13 %@eval[%_ccol+24] red on whi `7 -`
  scrput 14 %@eval[%_ccol+28] bri bla on whi %_mnu8
  scrput 14 %@eval[%_ccol+24] red on whi `8 -`
  scrput 15 %@eval[%_ccol+28] bri bla on whi %_mnu9
  scrput 15 %@eval[%_ccol+24] red on whi `9 -`
  scrput 16 %@eval[%_ccol+28] bri bla on whi %_mnu0
  scrput 16 %@eval[%_ccol+24] red on whi `0 -`
  scrput 18 %@eval[%_ccol+36] bla on gre eXit menu
  scrput 18 %@eval[%_ccol+37] bri whi on gre X
  scrput  0 %@eval[%_ccol+2] bri whi on blu %_DATE
  scrput  %@eval[%_rows-1] %@eval[%_ccol+29] bri cya on blu Rubot Software (C) 1990

:getkey
  screen 1 1
  inkey /w1 %%_key > nul
  scrput 0 %@eval[%_ccol+70] bri whi on blu %_TIME
  *set _Scr1 = %@eval[%_Scr1+1]
  if "%_Scr1"=="%_Dlay" *set _key=b
  if "%_key"=="" goto getkey

  iff "%_key"=="x" then^goto fini
  elseiff "%_key"=="" then^goto fini

:use aliases to call your programs
  elseiff "%_key"=="1" then^qb
    goto loop
  elseiff "%_key"=="2" then^qp
    goto loop
  elseiff "%_key"=="3" then^q3
    goto loop
  elseiff "%_key"=="4" then^cls^me
    goto loop
  elseiff "%_key"=="5" then^tc
    goto loop
  elseiff "%_key"=="6" then^wind
    goto loop
  elseiff "%_key"=="7" then^w5
    goto loop
  elseiff "%_key"=="8" then^cad
    goto loop
  elseiff "%_key"=="9" then^tx
    goto loop
  elseiff "%_key"=="0" then^db
    goto loop

:change screen size with UltraVision
  elseiff "%_key"=="u" then
    screen 18 %@eval[%_ccol+25]
    color bri yel on gre
    input What size UV screen? %%size
    uv %size>nul
    goto loop

:execute Buerg's list.com
  elseiff "%_key"=="l" then
    list
    goto loop

:execute a dos command
  elseiff "%_key"=="d" then
    unset _key
    drawbox 18 %@eval[%_ccol+22] 18 %@eval[%_ccol+57] 0 red on whi
    screen 18 %@eval[%_ccol+24]
    color bla on whi
    input %_cwd` >` %%doit
    cls
    call %doit
    pause
    cls
    goto loop

:help for menu
  elseiff "%_key"=="h" then
    list c:\4dos\4dum10.hlp
    goto loop

:help for 4Dos
  elseiff "%_key"=="?" then
    help dos

:calander
  elseiff "%_key"=="c" then
    drawbox 4 %@eval[%_ccol+21] 20 %@eval[%_ccol+60] 0 bla on cya fill cya
    call c:\4dos\4cal14
    goto loop

:time display
  elseiff "%_key"=="t" then
    drawbox 4 %@eval[%_ccol+21] 20 %@eval[%_ccol+60] 0 bla on cya fill cya
    call c:\4dos\4clk11
    goto loop

:blank the screen
  elseiff "%_key"=="b" then goto blanked

  endiff
  beep
  unset _key
  goto getkey
:blanked
  drawbox 0 0 %@eval[%_rows-1] %@eval[%_columns-1] 1 bla on bla fill bla
  pause >nul
:loop
  unset _key
  goto startm
:fini
  endlocal
  cls whi on bla
  quit