home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Aktief 1995 #3
/
CDA3.iso
/
comm
/
ts3m.zip
/
MNU.TXT
< prev
next >
Wrap
Text File
|
1994-12-16
|
19KB
|
515 lines
MNU Manual Page 1
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| Member
Version 3.00 December, 1994
MNU, is a batch file enhancer, readme tool, and menu program.
Its included to help make the overall package easier to use
and to adapt to your needs, and to show you how you can use
the remote support/package package with your favourite menu
program.
MNU has 3 main modes: ASK, MENU, and README
Each of the modes can have behaviour changes depending on
various settings. Much of the documentation suggests using
environmental variables, but you can use the MNU.INI file as
documented after the mode descriptions instead.
1) ASK MODE is a simple way of asking for user input within a
batch file. It displays the "input string" at the current
screen position and waits for a one key response. Only keys
in the "key list" are allowed:
MNU ASK <input string> - The string to display
<key list> - Keys that are acceptable responses
[DEFAULT=c] - The default key if enter is pressed
[TIMEOUT=n] - The number of seconds to wait
[DEBUG] - Causes the errorlevel to be displayed
[NOTIME] - Time remaining won't be displayed.
Upon exit it sets the DOS Errorlevel based on the order of key
pressed.
MNU Manual Page 2
Example: MNU ASK "<O>ki, <L>aser, <E>pson (press O, L, or
E): " OLE
After displaying "<O>ki, <L>aser, <E>pson (press O, L, or E):
" it waits for a keypress.If it's in the group (OLEole) it
sets the DOS Errorlevel according to the order in the key list
and exits. Esc exits with 0. Other options can be placed
after the key list:
DEFAULT - This is used to set a Default Key, to be used if
Enter is pressed or a TIMEOUT is reached. If "default=a" is
used, then when the user presses Enter, it would be the same
as pressing "a".
TIMEOUT - An example would be "timeout=30". If no key is
pressed within 30 seconds the program will terminate. If
there is a DEFAULT key set, it will act as if that key were
pressed.
DEBUG - (or /debug) This shows the DOS Errorlevel upon exit.
NOTIME - This prevents the time remaining from being displayed
when TIMEOUT is active.
An example linked to TeleShare:
echo off
REM This could be part of your autoexec.bat
REM Put the MNU line, DEFAULT=Y and TIMEOUT=10 on one line.
MNU ask "Load TeleShare? Y or N?" YN DEFAULT=Y TIMEOUT=10
REM
if errorlevel == 2 goto :bypass
if errorlevel == 1 goto :loadtele
goto :bypass
:loadtele
rem The TSH could be TSR on the 'local' machine
TSH
:bypass
rem continue autoexec.bat
A similar batch file could load a portion of the Hands On
remote access package.
2) MENU MODE is used to paint a menu on screen and allow users
to select a choice by positioning a light bar, or letter, and
pressing enter. Normally the menu is full screen but the NC
option reduces the menu to a minimum size. This allows you to
MNU Manual Page 3
stack successive menus, offset if you like, and to have the
menus pop up anywhere on the screen. MENU MODE returns the
DOS errorlevel set to the sequence number of the item
selected.
MNU MENU <options list separated by commas or spaces>
[options]
- MENU mode is used to pop up a list of menu choices. When
the user selects one and presses "Enter", it sets the DOS
Errorlevel based on the order of the item chosen.
Example: MNU MENU "Oki Printer","Laser Printer","Epson
Printer"
- A BOX will be displayed giving the options in a LIST. The
user may choose an option using the up and down arrow keys and
then press enter. It will set the DOS Errorlevel according to
the order of option chosen and then exit.
- There is a DEBUG option. If "debug" or "/debug" is placed
after the option list it will show the DOS Errorlevel upon
exit.
- The LOCATION of the box can be controlled by setting an
environment variable. Type the following at the command line
or in a batch file "set twp=1012". This would set the upper
left corner of the box to row 10, column 12. The coordinates
must contain 4 numbers. For instance row 9, column 1 would be
"set twp=0901". Row 0, column 0 would be "set twp=0000". If
you use the MNU.INI file to set TWP you lose the capability to
'stack' successive menus offset like cards unless you put
different MNU.INI files in different subdirectories.
- A title will be placed at the top of the menu box, if the
parameters include "t:title".
Example: MNU MENU "t:Printer Menu" "Oki" "Laser" "Epson"
- To create overlaid menus, use "NC" as a parameter. The
screen won't be cleared before popping up the new menu. You
can also use NC to make minimal sized menus.
Example: MNU MENU "NC" "t:Printer Menu" "Oki" "Laser" "Epson"
- You can set an environment variable (TWH) to over-ride the
default header of "Menu Choices". If you rename MNU to HOMNU
MNU Manual Page 4
the header becomes 'Hands On Remote Access' without using
environment space.
Example: SET TWH=ACME COMPANY MENU
- You can set an environment variable (TWSAV) to cause the
screen to be cleared and your message (up to 60 characters) to
be displayed. If you run out of environment space the message
will be truncated.
Example: SET TWSAV=I'm at Lunch. Return 1:30
The screen saver activates when you tap F7, and the screen is
restored when you tap another key. You can also use the
command line parameter or switch -NOBURN to have the screen
saver automatically start up when the menu starts. It starts
up every time you restart the menu when used this way, so you
might consider a 'startup' menu that includes -noburn and a
'working' menu batch file setup for 'during the day' usage.
MNU menu "t:Main Menu" "WordPerfect" "Lotus" "Quit" -NOBURN
# a sample startup with the -NOBURN option
Note that you can leave this screen saver running while the
remote access host is resident and waiting for a call, and it
will appear when the connection is completed. This also
provides an initial menu of choices.
You can add command line password capability by adding -P for
password and either including a password in the batch file or
running the batch file with a command line password. The
password capability is tied to the screen saver. If you use
-P, but do not use -NOBURN the screen saver is activated as if
you used -NOBURN.
# an example using passwor