home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beijing Paradise BBS Backup
/
PARADISE.ISO
/
software
/
BBSDOORW
/
SCRIPTS.ZIP
/
PHOMAST.DOC
< prev
next >
Wrap
Text File
|
1995-02-26
|
32KB
|
785 lines
PHOMAST.DOC
Michael R. Ash
CompuServe: 71350,3327 Internet: mikeash@csoftec.csf.com
This is the latest in a series of updates to PHOMAST.T scripts
designed to get you up and running utilizing the power of
Professional-YAM or ZCOMM. For performance and clarity I have
moved my opening remarks and instructions about setting up this
script into this file called: -> PHOMAST.DOC <- The PHOMAST.T
file is a pure ASCII file for View and Editing. Items below tell
you all you need to know to get up and running *FAST*.
New features of this update include fully automated menu
configuration, autospeed detection, and lots of slick coding
examples... When run for the first time this script will generate
a new file called 'PROFILE.DAT' containing specific configuration
information that in the past you used to have to know and write
into the script with an editor in advance before using YAM or
ZCOMM. Now when you enter 'yam' or 'zcomm' at the DOS prompt,
the script will ask you a few questions to set up the
configuration to include COM port identification and modem
initialization, and you are ready to communicate immediately
thanks to the power of the script language built into YAM and
ZCOMM!.
I have included comments throughout the PHOMAST.T script to help
you understand the fascinating and comprehensive script language
included in YAM and ZCOMM. In fact, important instructions are
covered in both the phones file as well as this document. Any
information in the PHOMAST.T script that follows a colon (:) mark
is not read/used by YAM or ZCOMM since it is interpreted as a
comment. When you are instructed to un-comment a line it means
to load the script into an editor and delete the colon at the
start of the line so the program can use it.
When ZCOMM is loaded it looks in the C:\ZCOMM subdirectory by
default for a file called PHOMAST.T -=- When YAM is loaded it
looks in the root for a file called PHONES.T (you could rename
PHOMAST.T to PHONES.T and put it in the root but there are a
couple of better ways to handle this). The simplest and most
flexible method is to use the DOS 'set phones' command (shown
below) to tell YAM/ZCOMM where to find its phones file. Another
method is to have PUTSNP.EXE (the serial number installing
program) change the default location of the phones files.
set PHONES=c:\zcomm\phomast.t
Page: 1
PHOMAST.DOC Michael Ash
The line above can be added to your AUTOEXEC.BAT file to tell YAM
where to look for its phones file. ZCOMM users won't need to use
this line unless they want to have PHOMAST.T in another directory
since it is already the default location for ZCOMM. The phones
file (PHOMAST.T) gives YAM/ZCOMM directions on how you want the
package to operate.
For those of you that haven't heard of YAM, it's the short name
for Professional-YAM, a commercial package that includes all of
ZCOMM (its shareware subset) plus advanced capabilities for
professional telecommunications requirements.
------------------------------
--- Background ---
When YAM/ZCOMM is first loaded it looks for a 'phones file' and
starts reading instructions at a label called 'setup:' telling
the package exactly how to operate in your system environment.
YAM/ZCOMM is a communication environment, a tool, that utilizes
instructions found in the phones file. It is the phones file
(this case PHOMAST.T) that is read by YAM/ZCOMM and instructions
found there are executed very much like the line by line commands
carried out in a UNIX script or a DOS BATCH file. Basically YAM
or ZCOMM is the airplane and your phones script is the pilot the
flies the plane.
PHOMAST.T (this phones file) is completely modular and includes a
simple HOST mode example. Both Professional-YAM and its
shareware subset ZCOMM offer a powerful communication
environment. Unfortunately, as with any powerful package there
is usually a steep learning curve involved. I have worked with
the environment and generated this starter script with full
documentation to assist users at all levels in tapping the power
of this environment. I say communication environment, because
unlike most other packages, Chuck Forsberg provides the
programming language tools you can use to build a powerful
command driven communication package you can configure to
function the way you do business, not how someone else thinks you
ought to work.
--- Configuration ---
If you want to modify the basic script, use an ASCII editor.
Page: 2
PHOMAST.DOC Michael Ash
QEdit on the other hand is one of the best fully configurable
shareware editors around. Remember if you use Word Perfect in
DOS Text mode or Word Star in non-document mode, be sure to set
the margins to support a 132 character document to avoid word
wrap of long script lines. To save time, if changes are
required, just SEARCH for sections marked with the symbol <*>.
These changes are optional and NOT required to run the package in
most cases.
1. Under COLORS, you may select the alternate screen colors.
These will be automatically set by the menu configuration and
only need to be changed if you don't like the default colors...
To see the possible colors and their associated code numbers,
from the command line prompt enter: 'gosub color' and hit return.
2. Under MODEM SETUP, if your modem doesn't respond correctly
to the defaults, just select another modem setup string. Again a
default modem string is already configured and will work in most
cases if your modem accepts the Hayes command set.
YAM or ZCOMM once loaded reads the script (like a BATCH file in
DOS) to determine how it is to operate in your specific
configuration. Any changes you make to the phones script
(PHOMAST.T) will change the way the package works for you.
YAM or ZCOMM is a 'command-line driven' package meaning you just
give it commands and it does the work. You don't have to go
through menus unless you want to. At the YAM/ZCOMM prompt, many
DOS and UNIX commands work. For example 'cls' clears the screen,
'dir' gives a directory (as does 'ls'), 'cd' will change
directory, 'cdd' changes both drive and directory. I'm sure
you'll enjoy this direct approach. To execute a DOS command at
the prompt just precede it with a '!' (e.g. !copy fileA fileB).
At the YAM/ZCOMM prompt you can recall past commands using the up
arrow key and edit the command line at that point since YAM/ZCOMM
keeps a history of what you have entered. The ESC key will clear
the command at the command line.
--- Getting On-Line ---
To DIAL a number just enter the phone number at the YAM prompt
Page: 3
PHOMAST.DOC Michael Ash
followed by a ';t' telling it to go into terminal mode (meaning
go into the mode to talk to the other computer). For example:
(F9=Menu) c:/yam-> 434-5566;t calls the phone number and once
connected puts you on line. If you want to hang up and exit the
session at any time just hit F1 to get back to the command line
and type 'off' and hit return. Simple!
--- File Transfers ---
Downloading files is very easy. ZModem, Kermit, and CompuServe-B
will begin a download automatically once host starts sending the
file. To send a file up, prepare the host to accept the file by
selecting a protocol; then hit F9 for the menu or give a command
at the command line. For example 'sz filespec' will send a file
ZModem to a host ready to receive the transfer. In the F9 menu
you will see shortcut keys defined (e.g. F4=ASCII Upload,
F6=ZModem Upload, F7=CRC-XModem download etc.) ASCII upload is
convenient for uploading pre-written ASCII messages.
--- What do I *REALLY* need ---
To use this environment you only need YAM.EXE or ZCOMM.EXE, the
main communication program, and a phones file (PHOMAST.T) to tell
it how to act with your equipment and tastes. Set up a
subdirectory called 'C:\ZCOMM' (using the DOS 'MD ZCOMM'
command), then place YAM.EXE or ZCOMM.EXE with the phones file
(PHOMAST.T) and help files if you want them there. Call the
package with the COMM.BAT file or setup your own BATCH file. If
you are using YAM or have the PHOMAST.T file somewhere other then
in the \ZCOMM subdirectory, remember to include the DOS command:
'set phones=c:\zcomm\phomast.t' in your AUTOEXEC.BAT file. Once
it is edited into your AUTOEXEC.BAT, activate it by typing the
command 'AUTOEXEC' at the DOS prompt.
When you first run the program with PHOMAST.T it will ask you
whether you have a PULSE dial (the older rotary type phone or
push button phone that clicks when it dials) or a TONE dial (the
push button phones that uses tones to do all the dialing). After
you make that choice if you have to add numbers to get an outside
line for all your calls (as with a PBX system) you can have it
put that '9' or whatever numbers in for you. Next it will look
at your hardware and try to find what COM port you have your
modem hooked to. Make SURE your modem is ON for this test,
otherwise you will have to tell the script what COM port is used.
--- Extra Stuff ---
Page: 4
PHOMAST.DOC Michael Ash
The following may be added to your AUTOEXEC.BAT file if you want
colors in your 'flash-up' help processor to match the default
colors.
set PHONES=c:\zcomm\phomast.t (YAM needs this particular line)
set NORMATTR=31 (sets normal attribute)
set REVATTR=26 (sets reverse attribute)
set UNDLATTR=31 (sets underline attribute)
This example expects to find YAM.EXE or ZCOMM.EXE and PHOMAST.T
in C:\ZCOMM. Remember a ':' before a line makes it a comment in
script file. This will activate OR deactivate lines of code. To
turn something OFF just put a ':' in front of the line. Words
starting in column #1 that end with a ':' are considered to be
labels...
To activate menu status or make a call from DOS command line
(assuming you are using ZCOMM.EXE) enter the command:
zcomm gosub menu <-- or --> zcomm call cis
The example on the left will bring a menu up when ZCOMM is
loaded; and the example on the right will load ZCOMM and then
call CompuServe... This can be either via a batch file or
directly as a DOS command. Note you can call any label in any
script file using:
zcomm call label.[path][file]
zcomm gosub label.[path][file]
If no path or file is included, the phones file is searched for
that specific label.
Auto-log demos are set for local San Antonio numbers... These
numbers may differ in your area and require an area code of
(512). BNF is an example of an auto-log to a WildCat(tm) BBS,
whereas Olde Guard is an example of an auto-log to a TComm(tm)
Bulletin Board System.
A word about how YAM/ZCOMM displays information on the screen
follows: Think about YAM/ZCOMM as running on four monitors on
your desk. If this were possible you'd see the following from
left to right on the four different screens:
|Full-Help| |Command Line| |On-Line Mode| |Circular Buffer|
<-- move left with F1 -=- F2 moves you right -->
Page: 5
PHOMAST.DOC Michael Ash
(F9 = Mini Help)
Now, since you only have one screen, the way you switch between
the four possible displays is by using the F1 and F2 function
keys. Picture F1 as moving you to a screen to the left and F2
moving you to a screen to the right. If you were On-Line,
hitting F1 once would put you into command mode. Hit F1 again
and you are in the flash-up help processor. If you hit F2 from
On-Line mode (called terminal mode) you move into the circular
buffer (which you can also access using the PgUp, PgDn, Home and
End as well). Hitting F1 puts you back On-Line, and F1 again
you're back to the command line... To tell where you are, in
Full-Help you'll see a help menu, in the command mode you will
see the command line, when on-line you will see the status line
at the bottom of the screen and in the circular buffer you will
see at the bottom of the screen a message "xx.x% Review Cmd?".
--- How to use the Circular Buffer ---
One of the most powerful features of YAM/ZCOMM is the circular
buffer. What this does is record your on-line session. If for
example something scrolls off the screen (a listing of files
perhaps) you can pop-up and review it by hitting the PgUp/PgDn,
Home, End keys, or F2 key if you're on-line. This takes you into
a review function where you see a history of what was on the
screen earlier. The Home key takes you to the start or top of
the buffer, the End key takes you to the bottom. You can tell
you are in the circular buffer since the bottom line will say
"x.xx% Review cmd?" showing you where you are in the buffer.
Hitting the PgUp/PgDn, Home, End, and arrow keys will move you
around. To get back on-line just hit F1 or the Return key.
You can search and cut info out of the circular buffer. Say
there is a message you want to save that's scrolled off the
screen that talks about 'modems'. Just hit the Home key to go to
the top of the buffer, enter the command 's' or '?' to search
then enter the word 'modems' and hit return. The line with that
word will move to the top of the screen. To cut this info, hit
't' to mark the Top, then move the messages using cursor keys
until the bottom of what you want to capture is on the top line
and hit 'b' for Bottom. This marks the text. Now enter the
command 'w' for Write and YAM/ZCOMM responds: 'Write to file:'
To this prompt just enter a file name or 'prn' to send it to the
printer. This allows you to cut information that scrolled off
the screen and save it for later. You can even 'read' a file
Page: 6
PHOMAST.DOC Michael Ash
into the circular buffer. At the command line give the command
'read filespec' and the file will be put into the buffer.
--- Some useful shortcut keys ---
Alt-1 is DOS shell where you can enter a DOS command
Alt-2 is YAM/ZCOMM command line where you can enter command
Alt-D is current directory contents
Alt-W writes open capture file
Alt-C closes an open capture file.
Alt-M changes keyboard mapping if you have others defined
Alt-N NUKE key - aborts whatever process running
Alt-S Shows status of running comm package
Alt-Q once download complete will log you off host. The
string sent by Alt-Q is define by 'set quitcmd' in
the script. To activate, hit Alt-Q once a download
is started...
Alt-Z ZAPS a copy of the screen saving it into a file called
YAMPIC. To see the file use the DOS file UNPIC.EXE and
give the command UNPIC YAMPIC. To save the screen as a
file use 'UNPIC YAMPIC > filespec' at the DOS prompt or
use '!UNPIC YAMPIC' at the YAM/ZCOMM prompt.
Ctrl-Home - Blanks the screen when on-line
F4 -- ASCII Upload (for sending messages prepared offline)
F9 -- Help Menu
F10 -- On-Line Manual
Shift-F6 -- Modify default Configuration / Colors
When writing script files the '!' is used for DOS shell and '@'
used to execute a YAM/ZCOMM command... (e.g. !chkdsk will run
Check Disk). That should get you going! Once you are up and
running look at the other commented features that will give you
even more POWER...
--- So what are the Menus ---
Once YAM/ZCOMM is loaded, if you hit 'F9' you will see the
following menu options.
F3 OPEN Capture file
Page: 7
PHOMAST.DOC Michael Ash
F4 Send ASCII Text (sending messages prepared offline)
F5 Send Kermit Upload
F6 Send Zmodem Upload <<BEST>>
F7 Receive CrcXmodem Download
F8 Send CrcXmodem Upload
F9 Press for THIS HELP SCREEN
F10 On-Line Manual
Alt-1 Get DOS Command prompt
Alt-2 Get ZCOMM Command prompt
Shift-F3 HOLDING Pattern online to keep the other end from
timing out and disconnecting. Basically, the
HOLDING Pattern sends a space/backspace to the
host every 2 seconds...
Shift-F4 Use Script Writer to generate your own autologon
Shift-F6 Change your Modem / Color Configuration
Shift-F7 Demonstration of dialing menu DIAL.T
Alt-F1 AutoLog B&F Tech BBS at 2400 baud
Alt-F2 AutoLog Olde Guard 2400 baud
Alt-F3 Write and then close opened Capture file
Alt-F4 Call CompuServe demo account at 1200 baud
Alt-F5 Call PC Magazine BBS
Alt-F6 Force local system into HOST MODE operation
Alt-F7 Sign your name with a function key
ALT-F9 Edit PHOMAST.T SCRIPT (Note: You can change
this Function Key assignment to use your
preferred editor.)
TO CALL OTHER BBSs: enter 'call name' where name is a label
To DIAL A NUMBER enter number followed by ';t' For example
use the format '523-8994;t'
-- CompuServe-B, KERMIT, and ZMODEM download automatic --
Stop Redialing ---- press <CR> Hangup w/o pgm exit - enter 'o'
To exit program just get to the command line and enter 'off'
Alt-N EMERGENCY EXIT, 'Nuke It' to get command line
----------------------------------------
Page: 8
PHOMAST.DOC Michael Ash
--- Specialized Keyboard Mapping information ---
YAM/ZCOMM lets you completely remap the keyboard if you wish.
Below is an example of a special application for Digital
Equipment interface that you could add to a script. I have
included the following advanced discussion here to supplement
normal documentation in case you need to utilize this powerful
keyboard mapping command. The bottom line is any that key can be
mapped to send any character string to the host computer.
Note: From the YAM/ZCOMM command line you can find the number
of the key sequence by entering a underline char "_" (underscore
command) followed by a return... This will display the key
sequence strings in a series of 4 numbers. For example hitting
the letter 'a' will produce: 30 30 0 0141 (Hitting Ctrl-a
produces 30 30 4 0001). The first two numbers are the
'scancodes' and actually the second number is the best to use
since it will take into account extended keyboard functions. The
third number shows the ShiftState which is actually the numeric
sum of what other keys are hit with the selected key. The
numbers are defined as follows:
0 - no other key hit with the target key
1 - the Right Shift key was held down as the key was hit
2 - the Left Shift key was held down as the key hit
4 - the Ctrl key held down as key hit
8 - the Alt key held down as key hit
16 - provided the Shift, Ctrl, and Alt key states match,
select this mapping regardless of whether the
Application Keypad Mode or the Decoded Function Key
conditions (below) are true.
32 - Alternate Keypad Mode (not numeric)
64 - Decoded Function Key (Character value > 0400 as
displayed by _ (underscore) command.
128 - Select this mapping unconditionally
You can even have specific combinations by summing the keys held
down. For example if the ShiftState is 3 this means both Right
and Left Shift keys held down. If the number is 14 means the
Right shift (2), the Ctrl (4) and the Alt (8) key were all held
down when the key hit (2+4+8=14). As you can see this gives you
very specific mapping even taking into account simultaneous use
Page: 9
PHOMAST.DOC Michael Ash
of multiple keys.
For more information see pg 184 under Terminal Emulation in the
YAM manual you receive when you register YAM or ZCOMM. Actual
keyboard mapping utilizes the command 'mk' with the following
syntax :
mk Scancode ShiftState Class String
where:
Scancode - Explained above using the '_' function. Take the
SECOND number displayed as the scancode to use here.
ShiftState - numeric sum of what other keys are hit as
explained above. Special case 128 maps unconditionally as with
Ctrl Arrow keys...
Class - determines the type of string to put ahead of your
selected sting. This saves you having to enter the 'ESC[' at the
start of each string for example.
Class 0 in VT mode puts "ESC[" before string
Class 1 in VT52 mode, ESC is prepended, otherwise "ESC O"
Class 2 specialized for Keypad, Not mapped in numeric mode
Class 3 puts just "ESC" before string
Class 4 nothing is added
Here is a brief example of what you can do...
mk :Clear old mapping
display mapkb vt100 :Setup VT100 display
pN2 :Turn off NumLock
mk 72 16 0 A : Up arrow (class=0 sends:ESC[A )
mk 80 16 0 B : Down arrow
mk 75 16 0 D : Left arrow
mk 77 16 0 C : Right arrow
mk 41 1 0 \d52\d126 : Map rf-Shift-~ sends: ESC[4~
mk 41 2 0 \d52\d126 : Map lf-Shift-~ sends: ESC[4~
mk 28 4 0 31~ : Ctrl-Enter Insert line Esc[31~
mk 21 4 0 32~ : Ctrl-Y delete line Esc[32~
mk 115 128 3 OR : Ctrl-Left move one word left
mk 116 128 3 OQ : Ctrl-Right move one word right
Example of fKEY mapping...
Page: 10
PHOMAST.DOC Michael Ash
set f10 "\E[21~" : Map F10 to Abort (ESC[21)
set fpgup "\E[6~" : Map PgUp to previous screen
set fpgdn "\E[5~" : Map PgDn to next screen
set fins "\E[2~" : Map INS key to Esc[2~
set bs "@mput \177" : Map BackSpace key to be Del
The above examples demonstrate that you can do essentially
anything you want to do...
-----------------------------------------------------------------
<<< Comments below courtesy of Bob Willoughby >>>
This is a "hands-on" script. It incorporates three "auto logon"
examples which show how to write an auto logon script. They
include auto logons to B&F, Olde Guard BBS here in San Antonio,
Texas and a demo account area of CompuServe...
You can generate an autolog script like the ones above using the
TurboLearn Script(tm) (Shift-F4). This will actually create
rough script that you can later refine and add to PHOMAST.T and
run from there. Having WildCat, TComm, and CompuServe examples
to work from lets you see lots of tricks that will help you
generate other automatic scripts. They can be made so
sophisticated that you can completely automate any procedure...
Examples of auto logon scripts may be found in PHOMAST.T and in
Chuck Forsberg's phone scripts distributed with YAM/ZCOMM. Other
examples are included in the file SCRIPTS.ZIP which may be
downloaded from Telegodzilla, the YAM/ZCOMM support BBS. The
YAM/ZCOMM manual explains how such auto logon scripts are
constructed and how to use the TurboLearn(tm) feature to automate
writing scripts. I recommend new users use this script
essentially "as is" for a while to test your new phone directory
entries and become familiar (comfortable) with YAM/ZCOMM. Then
you can enjoy the challenge, the fun, and the satisfaction of
modifying this script to add auto logon procedures, dial queues,
and the like.
Keep in mind that this is only an example script to use in
learning basic ZCOMM functions. You will have plenty of time to
enhance and embellish this script later.
-------------------------------------------------------------
Page: 11
PHOMAST.DOC Michael Ash
The only files you must have are YAM.EXE (or ZCOMM.EXE) and this
phones file PHOMAST.T -=- The following files are included in the
PHOMAST6.ZIP file:
PHOMAST.T -- the actual code YAM/ZCOMM reads
PHOMAST.DOC -- this documentation file
DIAL.T -- simple example of a dialing menu (optional)
HOSTHELP.TXT -- external help text for HOST mode (optional)
TUF_FONS.T -- an alternative, no-frills phones script
WHATS.NEW -- changes since PHOMAST5.T of one year ago
COMM.BAT -- example of BATCH file to call YAM/ZCOMM
----------------------------------------
I have tried to make this script as perfect as possible but like
most things in life there are no guarantees that I found
everything. I wish you the best of luck with YAM or ZCOMM.
Please let me know if you run into problems...
I have spent hundreds of hours over many years on this script to
make ZCOMM or YAM useful to new users right out of the starting
block. If this has helped you get a better grasp of the package
I would like to hear from you. If this really made a difference,
and you think my time is was well spent, throw a couple bucks my
way and I will go out for a Taco (what else in San Antonio...).
Regardless, I would appreciate a postcard, just to get an idea
who this script finally reached...
Michael Ash
3766 Tupelo Ln #2904
San Antonio, TX 78229
---------- Have Fun ----------
Page: 12