home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
bbs
/
getkey1
/
getkey.doc
next >
Wrap
Text File
|
1994-02-23
|
3KB
|
99 lines
GETKEY.TTP
A utility for Tomshell users
Copyright 23 February 1994 by GRUNT Software and Rich Tietjens
Version 1.00 Copyright 13 June 1993, GRUNT Software and Rich Tietjens
DISCLAIMER: If it screws up, I ain't responsible. Period.
FREEWARE NOTICE: This program and the documentation is freeware. It is
copyrighted and may not be sold for profit, nor modified or altered in
anyway. You may distribute the package freely (the package consists of
the GETKEY.TTP program and this documentation file, GETKEY.DOC).
Private BBSes which charge a fee for access may _NOT_ place this file for
download. Pay services such as but not limited to GEnie, CompuServe, and
Delphi may carry this archive for download. Public Domain and Shareware
libraries may include the archive on disks and charge a nominal copying
fee.
If you are a BBS sysop and you charge a fee for access, but think you may
qualify as a "pay service such as GEnie," the test is simple: If you are
paying commercial telephone rates for the BBS phone line, you qualify as a
pay service. If you are paying private phone charges only, and you charge
an access fee, then you do not qualify and may not make this file available
for download.
OPERATION:
Place the GETKEY.TTP program anywhere you want to. You must run it from
a Tomshell (and since it's designed to work especially with Tomshell,
there isn't much point in doing it any other way!).
GETKEY will accept a single keypress, write out a small Tomshell
batch file to pass the value of the key to the Tomshell environmental
variable "kp", and then exit. Possible values are any of the usual
letters, numbers, and punctuation, plus "RETURN", "ESC", "BS", "TAB",
and "DEL". Due to the way the ST handles keyboard input, the HELP,
UNDO, INSERT, CLR/HOME, cursor, and function keys all generate a
value of zero, making it impossible to determine which one was
pressed using GETKEY.
You may also use GETKEY to display a menu; it accepts an optional
parameter on the command line, which should be a full pathname for the
menu. GETKEY will display the menu file on the screen. The menu file
may contain VT-52 codes in addition to the usual printable characters.
If no filename is passed, GETKEY will skip over that section of the
code.
Here's an example command line for Tomshell:
GETKEY.TTP c:\bbs\reader.men
The menu might look like:
Select a FZDT configuration:
[1] Rich's FreezeDried Terminal
[2] Paul's FizzDizz
[3] Kathy's FZDT Boutique
An example output file (always named "KP.TOM") looks like:
set kp n
and you would assemble a short routine looking like the following to
select from a menu of 3 items:
GETKEY.TTP c:\bbs\reader.men
kp
if $kp == 1 then goto RICH
if $kp == 2 then goto PAUL
if $kp == 3 then goto KATHY
if $kp < 1 or $kp > 3 then system
:RICH
rich.tom
:PAUL
paul.tom
:KATHY
kathy.tom
GETKEY.TTP is very fast and will overwrite the old output file each time
it is run. It takes only a second to create the file.
FEEDBACK:
If you don't understand anything in the documentation, or if you have
comments or questions about the operation of this program, send feedback
to:
Rich Tietjens at
Fido node 1:3807/110
PrivacyNet node 30:1000/10
AtariNet node 51:2/10
RoverNet node 66:660/912
AdultLinks node 69:1502/10
NeST node 90:301/20
GLP-Net node 386:318/100