As an extension to what Jeffrey suggested, at one time I used a simple batch 
file with some of my utilities, along with CHOICE and ANSI, to set up a menu of 
commonly used applications.  I don't use it any more, but following is the 
latest version I was using.  It allows up to 36 options (26 letters and 10 
numbers).

It uses ANSI to highlight the choices in the menu, CHOICE to handle the 
keyboard input, my SCANCODE program to automatically pick a menu choice after a 
timeout, and my MOUSKEYS program to allow selection with a mouse instead of 
just using the keyboard (incidentally, all of the hidden asterisks are there to 
allow you select the menu item with the mouse from anywhere on the menu line).  
It also uses an unreleased program of mine called ISLOADED to detect whether or 
not ANSI.SYS (or some equivalent) is installed and if the screen is color or 
monochrome.  You can manipulate the batch file however you want.

You can download SCANCODE and MOUSKEYS from my web site (http:/bretjohnson.us), 
and I can send you ISLOADED if you want it as well (ISLOADED is currently 
unfinished and undocumented).  For what you're doing, though, I think you could 
manage without any of those.

I know there are also programs specifically designed for menu selection, but 
doing it with a simple batch file and some free utilities always seemed like a 
more flexible option to me.

Anyway, here it is (kind of long).  I can also send it as an e-mail attachment 
if anyone cares.

  @ECHO %Eco%
  CALL SetMouse

:MouseOK
  %DOSDrive%
  CD\
  CALL 25x80
  LH MousKeys
  ScanCode W 13,42 "S - Screen", Idle 120, Only 0.1, W 13,42 "S - Screen", Z, D 
0.3, "s", Z-, R
  IsLoaded Ansi > NUL
  IF ErrorLevel 1 GOTO NoANSI
  IsLoaded Color > NUL
  IF ErrorLevel 1 GOTO Mono

:Color
  SET Text=[0;37;44m
  SET FKey=[1;31;44m
  SET Hide=[0;34;44m
  GOTO Start

:Mono
  SET Text=[0;37;40m
  SET FKey=[1;37;40m
  SET Hide=[0;30;30m

:Start
  CLS
  ECHO.
  ECHO    %FKey%1%Text% %Hide%********************************    
%FKey%6%Text% - File Wizard %Hide%*****************
  ECHO    %FKey%2%Text% %Hide%********************************    
%FKey%7%Text% %Hide%*******************************
  ECHO    %FKey%3%Text% - Virus Scan (F-PROT) %Hide%**********    
%FKey%8%Text% %Hide%*******************************
  ECHO    %FKey%4%Text% - WordPerfect %Hide%******************    
%FKey%9%Text% %Hide%*******************************
  ECHO    %FKey%5%Text% %Hide%********************************    
%FKey%0%Text% - QUIT %Hide%************************
  ECHO.
  ECHO    %FKey%A%Text% %Hide%********************************    
%FKey%N%Text% - Norton Utilities %Hide%************
  ECHO    %FKey%B%Text% - Bingo (Text Editor) %Hide%**********    
%FKey%O%Text% %Hide%*******************************
  ECHO    %FKey%C%Text% %Hide%********************************    
%FKey%P%Text% - Procomm Plus %Hide%****************
  ECHO    %FKey%D%Text% %Hide%********************************    
%FKey%Q%Text% - QUIT %Hide%************************
  ECHO    %FKey%E%Text% - Edit text (TED) %Hide%**************    
%FKey%R%Text% - Reboot the Computer %Hide%*********
  ECHO    %FKey%F%Text% %Hide%********************************    
%FKey%S%Text% - Screen Saver (Dazzle) %Hide%*******
  ECHO    %FKey%G%Text% - Games %Hide%************************    
%FKey%T%Text% - Set the Time %Hide%****************
  ECHO    %FKey%H%Text% %Hide%********************************    
%FKey%U%Text% - USA Atlas %Hide%*******************
  ECHO    %FKey%I%Text% - Interrupt Helper %Hide%*************    
%FKey%V%Text% - View some pictures %Hide%**********
  ECHO    %FKey%J%Text% %Hide%********************************    
%FKey%W%Text% - World Atlas %Hide%*****************
  ECHO    %FKey%K%Text% %Hide%********************************    
%FKey%X%Text% - QUIT %Hide%************************
  ECHO    %FKey%L%Text% %Hide%********************************    
%FKey%Y%Text% %Hide%*******************************
  ECHO    %FKey%M%Text% - Money Counts %Hide%*****************    
%FKey%Z%Text% %Hide%*******************************
  ECHO.
  ECHO.
  ECHO %Text%               Your Selection?    (Q, X, or 0 to QUIT)
  ECHO.

  CHOICE /N     /C:1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
    REM Errorlevel 000000000111111111122222222223333333
    REM            123456789012345678901234567890123456

    IF ErrorLevel 37 GOTO Stop
    IF ErrorLevel 36 GOTO Z
    IF ErrorLevel 35 GOTO Y
    IF ErrorLevel 34 GOTO X
    IF ErrorLevel 33 GOTO W
    IF ErrorLevel 32 GOTO V
    IF ErrorLevel 31 GOTO U
    IF ErrorLevel 30 GOTO T
    IF ErrorLevel 29 GOTO S
    IF ErrorLevel 28 GOTO R
    IF ErrorLevel 27 GOTO Q
    IF ErrorLevel 26 GOTO P
    IF ErrorLevel 25 GOTO O
    IF ErrorLevel 24 GOTO N
    IF ErrorLevel 23 GOTO M
    IF ErrorLevel 22 GOTO L
    IF ErrorLevel 21 GOTO K
    IF ErrorLevel 20 GOTO J
    IF ErrorLevel 19 GOTO I
    IF ErrorLevel 18 GOTO H
    IF ErrorLevel 17 GOTO G
    IF ErrorLevel 16 GOTO F
    IF ErrorLevel 15 GOTO E
    IF ErrorLevel 14 GOTO D
    IF ErrorLevel 13 GOTO C
    IF ErrorLevel 12 GOTO B
    IF ErrorLevel 11 GOTO A
    IF ErrorLevel 10 GOTO 0
    IF ErrorLevel  9 GOTO 9
    IF ErrorLevel  8 GOTO 8
    IF ErrorLevel  7 GOTO 7
    IF ErrorLevel  6 GOTO 6
    IF ErrorLevel  5 GOTO 5
    IF ErrorLevel  4 GOTO 4
    IF ErrorLevel  3 GOTO 3
    IF ErrorLevel  2 GOTO 2
    IF ErrorLevel  1 GOTO 1
    GOTO Stop

:1  
  ScanCode Uninstall
  Delay 0.2
  Menu
:2
  ScanCode Uninstall
  Delay 0.2
  Menu
:3
  ScanCode Uninstall
  Delay 0.2
  CALL FProt
  Menu
:4
  ScanCode Uninstall
  Delay 0.2
  CALL Wp
  Menu
:5
  ScanCode Uninstall
  Delay 0.2
  Menu
:6
  ScanCode Uninstall
  Delay 0.2
  CALL Fw
  Menu
:7
  ScanCode Uninstall
  Delay 0.2
  Menu
:8
  ScanCode Uninstall
  Delay 0.2
  Menu
:9
  ScanCode Uninstall
  Delay 0.2
  Menu
:0
  ScanCode Uninstall
  Delay 0.2
  GOTO Stop

:A
  ScanCode Uninstall
  Delay 0.2
  Menu
:B
  ScanCode Uninstall
  Delay 0.2
  CALL Bingo
  Menu
:C
  ScanCode Uninstall
  Delay 0.2
  Menu
:D
  ScanCode Uninstall
  Delay 0.2
  Menu
:E
  ScanCode Uninstall
  Delay 0.2
  CALL Ted
  Menu
:F
  ScanCode Uninstall
  Delay 0.2
  Menu
:G
  ScanCode Uninstall
  Delay 0.2
  SET Text=
  SET FKey=
  SET Hide=
  Games
  Menu
:H
  ScanCode Uninstall
  Delay 0.2
  Menu
:I
  ScanCode Uninstall
  Delay 0.2
  CALL I
  Menu
:J
  ScanCode Uninstall
  Delay 0.2
  Menu
:K
  ScanCode Uninstall
  Delay 0.2
  Menu
:L
  ScanCode Uninstall
  Delay 0.2
  Menu
:M
  ScanCode Uninstall
  Delay 0.2
  CALL Mc
  Menu
:N
  ScanCode Uninstall
  Delay 0.2
  Norton
  Menu
:O
  ScanCode Uninstall
  Delay 0.2
  Menu
:P
  ScanCode Uninstall
  Delay 0.2
  CALL PcPlus
  Menu
:Q
  ScanCode Uninstall
  Delay 0.2
  GOTO Stop
:R
  ScanCode Uninstall
  Delay 0.2
  Reboot
  Menu
:S
  ScanCode Uninstall
  Delay 0.2
  CALL Dazzle
  Menu
:T
  ScanCode Uninstall
  Delay 0.2
  CALL Nbs
  Menu
:U
  ScanCode Uninstall
  Delay 0.2
  CALL Usa
  Menu
:V
  ScanCode Uninstall
  Delay 0.2
  CALL View
  Menu
:W
  ScanCode Uninstall
  Delay 0.2
  CALL World
  Menu
:X
  ScanCode Uninstall
  Delay 0.2
  GOTO Stop
:Y
  ScanCode Uninstall
  Delay 0.2
  Menu
:Z
  ScanCode Uninstall
  Delay 0.2
  Menu

:NoANSI
  CALL Beep
  ECHO.
  ECHO ANSI.SYS must be loaded before the menu system will work.
  ECHO.
  GOTO End

:Stop
  SET Text=
  SET FKey=
  SET Hide=
  ScanCode Uninstall
  CALL %Screen%
  CLS

:End 


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to