home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
zcomm.zip
/
PHOMAST.T
< prev
next >
Wrap
Text File
|
1990-05-12
|
51KB
|
938 lines
-Revised to YAM/ZComm Version 17.47+ MRA mods 1 Jan 90
Release 8.2 Master
This starter script was written for your convenience by Michael Ash
CompuServe Account: 71350,3327
PHOMAST5.T
NOTICE --> for a FAST START please take a minute and follow the
instruction below... This script is completely modular for your
convenience, and includes a simple HOST mode example.
Use an ASCII editor like TED.COM, WordPerfect in DOS Text mode or
WordStar in non-document mode to check the items below to match
your particular computer setup. To save you time just SEARCH for
sections marked with the symbol <*>
1. Under SETUP, select port 1 or 2 by un-commenting your choice.
(Note: "un-commenting" is explained below.)
2. Under COLORS, select the color string you prefer.
3. Under MODEM SETUP, select the proper modem setup string.
4. Under Environment, select PULSE or TONE dial.
5. See HELPFILE section if you are running older versions of ZCOMM.
Be sure to rename THIS file PHODIR.T for use with YAM or ZCOMM. Actually
you can name it what you like as long as you use the 'set phones' command
(shown below) to tell YAM/Zcomm where to find this phones file. 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.
To use this environment you only need YAM or ZComm, the main communication
program, and a phones file (like this) to tell it how to act with your
equipment and taste. Set up a subdirectory called C:\COMM, place YAM or
ZComm with this file (and helpfiles if you use them) then path it in your
AUTOEXEC.BAT file. After a few adjustments of this file you're ready to
go! In older version of PHOMAST I used to setup ZComm in \zcomm and YAM
in \yam. To make it simpler to use this script with either program I
now have it setup to run under C:\COMM -=- Feel free to change this
once you understand how it works to a subdirectory of your choice...
The following may be added to your autoexec.bat file to give color to
your 'flash-up' help processor... comments here in ()
set PHONES=c:\comm\phodir.t (tells program where to find setup)
set NORMATTR=2 (sets normal to green)
set REVATTR=3 (sets reverse to blue)
set UNDLATTR=10 (makes underline brt green)
This script expects to find YAM/ZCOMM and PHODIR.T in C:\COMM and a
C:\COMM\TEMP temporary subdirectory...
Note a ":" before line makes it a comment... this is the method
to activate OR deactivate lines of code. To turn something OFF
just put a ":" in front of the line. Words ending with a ":" starting
in column #1 are considered to be labels...
To activate menu status or make a call from DOS command line enter:
zcomm gosub menu <-- or --> zcomm call cis
This can be either via a batch file or directly as a DOS command... Note
you can call a phones file anywhere using: zcomm call label.[path]file
NOTICE that Olde Guard and CIS auto-log demos are set for local San Antonio
numbers... These numbers may differ in your area. Olde Guard is an example
of an auto-log to a TComm(tm) Bulletin Board System.
A word about the types of displays you can have. Think about YAM/ZComm as
being displayed on four monitors on your desk. If this were possible you'd
see the following from left to right on the four different screens:
|Help| |Command Line| |OnLine Mode| |Circular Buffer|
<-- move left with F1 -=- F2 moves you right -->
Now realizing you have only one screen, the way you switch between the
four possible displays is 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 OnLine, hitting F1 once would put you into
command mode. Hit F1 again and you are in the flashup help processor.
If you hit F2 from OnLine mode (called terminal mode) you move into
the circular buffer (which you can access using the PgUp, PgDown, Home
and End as well). Hitting F1 puts you back OnLine, and F1 again you're
back to the command line...
Some useful shortcut keys: Alt-1 is DOS shell, Alt-2 is YAM Command line.
When writing script files the '!' is use for DOS shell and '@' used
to execute a YAM/ZComm command... (i.e. !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...
----------------------------
I have spent many hours on this beginner script to make ZCOMM or YAM
useful to the novice user 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 you find it truly useful, and you think my time is worth
something, please send me a dollar and I'll go out for some coffee.
What ever you do, I would appreciate a postcard, just to get an idea
of who this script finally reached...
Michael Ash
3766 Tupelo Ln #2904
San Antonio, TX 78229
Happy Computing...
----------------------------
<*> >>> This SETUP script is where it all begins <<<
setup port 1 :designate COM1
: port 2 :designate COM2 (note ':' turns this OFF)
ena -d :suppress the Carrier Lost msg during setup
: ena -D :establishes a 2sec timing loop for line hits
:(use for call waiting where you can't disable)
: pa4000 :use for clones running 8 MHz and above...
pd1 :turn on time stamping
pi10 :set redial for 10 seconds...
pt4 :set ascii throttle to 20 char/sec (lower=faster)
pv-1 :Verbose OFF (-1 shows none; 50 shows all)
pT5 :set histfile minimum command size = 5 characters
: p-1 :for those using MKS ToolKit UNIX Shell
display bell=visual :turns off bell sound
:: The option below allows you to hit an up arrow key to use past
:: commands by setting up a history file. Since all keystrokes are
:: recorded, (including passwords) you may want to have your calling
:: batch file delete it or use a RAMDISK when active for security.
:: Be sure to remove the leading ':' if you want to use this...
: history c:\histfile ::here setup to put in C:\histfile
:: <*> --- Set up DISPLAY COLORS below ---
:: if dc means -- If Display Color... then use these settings
:: n=text, r=reverse, u=underline, s=status line, *=message,
:: @=file indicator (normally binking i.e. files open)
:: For example: 2=green, 3=blue, 10=bright green etc...
if dc pn7 pr7 pu7 ps7 p*7 p@7 :sets up default white on black
: if dc pn7 pr112 pu15 ps7 p*7 p@7 :alternate for monochrome
: if dc pn15 pr15 pu15 ps15 p*15 p@15 :setup for composite monitors
: if dc pn3 pr10 pu10 ps14 p*10 p@10 :if RGB, a color monitor string
: if dc pn31 pr30 pu15 ps14 p*15 p@79 display warpdrive :gas plasma
: if dc pn3 pr30 pu15 ps14 p*12 p@79 display warpdrive :alternate1
: if dc pn2 pr10 pu6 ps3 p*3 p@3 display warpdrive :alternate2
: >>> The line BELOW sets up an EGA/VGA monitor <<<
: if dc pn2 pr30 pu15 ps3 p*3 p@79 display warpdrive
:: --------------------
: if c goto online :if carrier detected skip modem setup
:: Modems using stored profiles will have to initialize and store it
:: before this will function correctly...(i.e. Hayes 2400)
:: The above line allows you to check the carrier status when YAM/ZCOMM is
:: loaded. This means you can take full advantage of the eXit to DOS
:: function. Anytime you are on-line you can get to the command line by
:: hitting F1 then enter 'X'. What this does is unload the communication
:: program but leaves the modem and serial port active. Now you have full
:: access to DOS and can return on-line (as long as the host doesn't time
:: out). Once through with DOS, re-load YAM/ZCOMM like you did initially
:: and WHAM -- you're back on-line as if you had never left... To utilize
:: uncomment this line and one a couple of screen down stating: "if c..."
:: --- Check Modem Status ---
cls; lput "\r\n\n\n\t\t\t>>> Modem setup in progress <<<\r\n\n"
:: Below is an example of how to use color and graphics (off now). Remember
:: if you want to use graphics you MUST have a line in your 'config.sys'
:: file telling DOS where ANSI.SYS driver is located. If ANSI.SYS is copied
:: into C:\ you could use the line: 'device=c:\ansi.sys' in your config.sys
:: file...
: echo "\n\n\n\t\t ╓──────────────────────────────────────╖"
: echo "\t\t ║ \E[44;1;33m >>> Modem setup in progress <<< \E[0m ║"
: echo "\t\t ╙──────────────────────────────────────╜\n"
sp 1200 : Initially set up speed at 1200 baud
pat 9 K\r\n : Check for OK from modem
rc: put "ATZ\r"; wait -f3 : ATZ then wait up to 3 sec for OK
if 9 goto modset : If Modem on (OK) skip error msg
echo "\n\t\t Please turn your modem ON, or check port setup..."
sleep 20 : You get 2 seconds to turn it on!
cls; goback rc : Check modem again...
:: <*> --- Some of the common MODEM SETUP commands definitions ---
:: &C1=Data Carrier Detect &D2=hang up with change in DTR &J=jack type
:: E1=modem echos commands back to terminal V1=Word result codes
:: &S1=run RS232C spec &W=Save config to nonvolatile memory L=speaker low
:: X4=Detect dial tones and busy signals; enable extended result codes.
:: With this activated (default for most modems) status messages are
:: sent to the screen about modem activity. English words instead of
:: number codes are displayed on the screen.
:: S0=answer rings S6=dial tone wait S7= wait for connect S8=pause for ","
:: S9=Carrier det response S10=delay carrier lost and hangup S11=dial speed
:: Remember if your modem doesn't hang up correctly try &D2 in the string.
modset:
putw "AT E1 V1 X1 S0=0 S7=60 S8=2 S11=50 \r" :Normal 1200 baud setup
: -- Line below is an alternate 1200 baud setup command --
: putw "AT E1 Q0 S0=0 S6=3 S7=40 S8=2 S10=10 S11=50 V1\r" ; wait -f2
: putw "AT E1 L X4 V1 &C1 &D2 &J \r" :Hayes/Zenith 2400 baud
: putw "AT S0=0 S6=3 S7=60 S10=10 S11=50\r" :second line
: putw "ATZ0\r" : Recalls Hayes Profile 0 if already defined
: put "AT E0 V1 X4 &D2 \r" :for everex 2400 baud
:: -- A suggest ZOOM 2400 baud modem setup is listed below --
: handshake both : Handshakes both CTS or XOff
: putw "AT &C &D2 &L0 C1 X5 S9=5 S10=10 S11=40 S25=0 +Z0=2 +Z3=45\r"
: S25 DTR timing to 0 seconds
: wait -f1 : Wait 1 second and let modem catch up...
:: <*> --- Setup Environment Variables ---
online:
: set mprefix ATDP : Pulse Dial (commented out here)
set mprefix ATDT : Tone Dial (now set to be active...)
: set mprefix ATDP1170, : Pulse Dial call waiting defeat (Texas)
: set mprefix ATDT*70, : Tone Dial call waiting defeat (Texas)
set l "1"; set m "1"
:: Above Sets long distance carriers. You have two choices 'l' & 'm' you
:: could use for your long distance service, for example MCI, Sprint).
:: Starting a phone# with %m will place the call using your pre-defined
:: long distance service account... (here they are both set to dial 1)
set answerback "\r\nYour NAME and CITY\r\n\21"
set disks "abcde" :set up active disks (you can restrict)
:: Note the prompts below can be anything you wish...
set mprompt "\r\E[1m(F9=Menu) %drive:\L%pwd-> \E[m" :Help prompt
: set mprompt "\r\E[1m%drive:\L%pwd->\E[m " :Normal path prompt
set hprompt "\r\E[1m%drive:\L%pwd\U [HOST]->\E[m " :HOST mode prompt
:: <*> -- HELPFILE Defined Below --
:: Notice Flashup help processor called with F10 as defined in key setup
:: or when F1 hit at command line. The command @! breaks down as follows,
:: the @ identifies a YAM command and ! means shell to DOS. Below it runs
:: a DOS program call yhp to get YAM-Help.
: set helpfile "@!yhp \comm\zmanh.hlp zmain" :Help Processor for ZComm
: set helpfile "@!yhp \comm\umanh.hlp main" :Help Processor for YAM
:: ^-- Be sure to comment in the correct choice!
: set helpfile "@yhp \comm\zmanh.hlp" :(older ZCOMM/YAM call)
:: -- Optional setup statements --
: set calllog c:/YAM/calllog : Setup call log (YAM only)
set fleft "@mput \b" : Makes left arrow destructive bksp
set fright "@mput \40" : Makes right arrow a right space
set adlopts r : Makes Auto ZModem use crash recovery
set quitcmd \003\336off\r : ALT Q logs off automatically after d/l
: set dirrx c:/comm/temp : Sets up default for downloaded files
set tmp c:/comm/temp : Both tmp and lib are shortcut paths
: set lib c:/arc_stor : you can use in your script. For example
: if later you add the line 'cd %tmp' it
: will put you in the c:\comm\temp
: subdirectory...
:: -- Define Function Keys --
key: cls :Notice how a label starts in Col 1 and ends in a ":"
reskeys :reset function keys
:: Explained below is the function key define command 'set'. Note below
:: the command format sets a FUNCTION KEY to a specific task:
set f3
@accept s1 "Enter name of Capture File: " ; create -s+ %s1 ; t
: Notice that I used a special case of the 'set' command where the
: key definition actually appears on the next line starting in col #1.
: The reason for this is normally function key commands are in
: quotes, yet here I wanted a quoted string inside the command. To
: avoid having quotes within quotes, there is a special version of the
: set command that accepts the next line starting in column 1, as an
: implied command. This means you don't need quotes around it...
: To explain how the command works remember anything beginning with
: an "@" sign is a YAM/ZCOMM command (a @! allows you to execute a DOS
: program). Let look at this command defining f3 step by step...
: The command "set" tells the program to set the function key
: (this case F3) to the following string:
: @accept s1 Enter name of Capture File: ;create -s+ %s1 ; t
: You could have used an escape sequence \40 to define a space
: in the string but only necessary in single line format. This will
: make the prompt --> Enter name of Capture File: <-- Now the "accept"
: command assigns anything you type in response to this prompt and
: stores in a variable s1. Remember ";" is just a way to
: separate multiple commands on each line, so you see when we come to
: next command "create", it causes a capture file to be opened
: using the name you have entered. The modifiers -s+ means, strip
: off control characters (-s) and append to the file (+) if it already
: exists. Notice the argument %s1 will insert the file name
: added after the prompt (stored in s1), and ;t just puts YAM/
: ZCOMM back into terminal mode (ie connected to the other computer)
: instead of leaving you in command mode.
: You see the PLUS of YAM/ZCOMM is that you can make things look
: anyway you want. You can set 38 function keys ( remember that
: F1 moves you from circular buffer to terminal mode to command mode
: and F2 moves you in the opposite direction). YAM/ZCOMM has THREE
: displays (command line, terminal mode, and circular buffer) yet this
: is a FAST way to move between them...
: Now set a series of function keys to activate specific commands...
:: --- NORMAL Function Key Definitions ---
set f4
@accept s1 "Send ASCII Msg named: " f -p %s1 : send ASCII text or upload
: a message...
set f5
@accept s1 "Send file using Kermit called: " kermit sb %s1 : send Kermit
set f6
@accept s1 "Send file using ZModem called: " sz -Z %s1
: above sends file with ZModem Run Length Encoding (RLE) using '-Z'
set f7
@accept s1 "Receive file using CRCXModem called: " rc %s1 :receive CRCXmodem
set f8
@accept s1 "Send file CRCXModem called: " sx %s1 :send CRC Xmodem
set f9 "@gosub menu" :Call Quick Reference using F9
set fc1 "@gosub menu" :Call Quick Reference using Ctrl-F1 as well
: set f9 "@gosub fkeys" : Call ANSI function key menu (commented out here...)
set f10 "@help" : Call help processor (newer YAM/ZComm versions just hit F1)
:: --- SHIFTED Function Key Definitions ---
set fs3 "@gosub color"
set fs4 "@echo working...; gosub tlearn"
set fs5 : check phone dir entries
@accept s5 "Search for title name: "; find \n%s5 %phones
set fs6
@echo "\t\t\t Shift F6 not defined -- Hit F9"
set fs9 "@!ted" : @! allows for running DOS program (this case TED)
:: --- ALT-ed Function Key Definitions ---
set fa1 "@call -100 oldg" : Examples of key assign
set fa2 "@call -100 oldg24" : note "@call -100" will
set fa3 "@write; close" : call number up to 100
set fa4 "@kill; call -100 CIS12" : times if busy.
set fa5 "@kill; call -100 pcmag" : kill clears buffer...
set fa6 "@kill; bye; gosub host" : Call for HOST mode
set fa7 "\r \r\t\t\t\t\t <your name here>\r\rl\r" : When on-line, Alt-7 signs
: your name in a message...
set fa8 "@!ted c:\comm\phodir.t" : Calls PC Mag TinyEditor and
: loads the phodir.t file (ALT-F8)
set fa9 "@!ted c:\comm\phodir.t" : Calls PC Mag TinyEditor (ALT-F9)
: ...you can even have 2 the same!
: set fa9 "@!q c:\comm\phodir.t" : example using QEdit
:: This is an opening msg for new ZComm users and can be commented
:: out if you wish to skip the opening message.
echo "\n\n\t\t\t -=* Press F9 for Quick Reference *=- \n\n\n\n\n\n\n\n"
:: Second part of testing for on-line conditions
:: (Optional)
: if !c return :if no carrier return, else go online
: echo "\t\t System still on-line with remote server..."
: putw "\r" ; t :hit return and return to terminal mode
return : Returns system back to terminal mode
:===========================================================================:
menu cls :On screen Menu Generation...
echo " >>> YAM/ZComm Function Key Menu <<< "
echo " "
echo " Alt-N EMERGENCY EXIT, 'Nuke It' to get out of trouble/escape a command "
echo " "
echo " F1 Exit Circular Buffer F2 Enter Circular Buffer "
echo " F3 OPEN Capture file F4 Send ASCII Text "
echo " F5 Send Kermit Upload F6 Send Zmodem Upload <<BEST>> "
echo " F7 Receive CrcXmodem Download F8 Send CrcXmodem Upload "
echo " F9 Press for THIS HELP SCREEN F10 Flashup Help Processor "
echo " Alt-1 Get DOS Command prompt Alt-2 Get ZCOMM Command prompt "
echo " "
echo " sF3 Show some ZComm color choices sF4 Use Turbolearn Script Writer "
echo " sF5 Search for dialing entry sF6 <not defined> "
echo " "
echo " aF1 AutoLog Olde Guard (1200 baud) aF2 AutoLog Olde Guard (2400 baud) "
echo " aF3 CLOSE Capture file aF4 CIS DEMO at 1200 baud "
echo " aF5 Call PC Magazine's BBS aF6 Enter HOST MODE operation "
echo " aF7 Sign name on-line ALT-F9 Edit PHODIR.T SCRIPT "
echo " "
echo " TO CALL OTHER BBSs: enter 'call name' where name is a label "
echo " "
echo " Stop Redialing ---- press <CR> Hangup w/o pgm exit - enter 'bye' "
echo " PgUp into Buffer; <CR> to return -> EXIT hit F1 then -- enter 'off' "
return
:: -------------------------------------------
:: --- For Fancy TOP LINE Menu using ANSI Graphics ---
:: -------------------------------------------
:: Notice the ANSI color setup using 'echo' or 'lput' is not simple. Shown
:: here the \E[44;36m sets up light blue letters on dark blue background.
:: To change to yellow on red for example just search and replace \E[44;36m
:: with \E[33;41m -- Notice in this example I change pn (normal color)
:: to pn15 to make bright white. To change back at end of each sequence
:: I moved it back to pn3 (blue). Be sure to change this to whatever
:: normal color you want...
fkeys ::func keys menu
pn15 ::make normal color WHITE
lput "\E[s" ::save cursor position
lput "\E[1;1f" ::move cursor to menu line
lput " 1\E[37;44mExit B\E[0;m 2\E[37;44mEnterB\E[0;m 3\E[37;44mO Capt\E[0;m 4\E[37;44mSascii\E[0;m" ::the menu
lput " 5\E[37;44mSKermt\E[0;m 6\E[37;44mSZmodm\E[0;m 7\E[37;44mRec CX\E[0;m 8\E[37;44mSCxmod\E[0;m" ::the menu
lput " 9\E[37;44mA KEYS\E[0;m 0\E[37;44m>HELP<\E[0;m"
lput "\E[u" ::restore cursor position
set f9 "@gosub altkeys" ::f9 calls ctrl f keys next
pn3 ::change normal color to blue
return
altkeys ::alt-func keys menu
pn15 ::make normal color WHITE
lput "\E[s" ::save cursor position
lput "\E[1;1f" ::move cursor to menu line
lput "a1\E[37;44mGurd12\E[0;ma2\E[37;44mGurd24\E[0;ma3\E[37;44mCloseC\E[0;ma4\E[37;44mCISdem\E[0;m" ::the menu
lput "a5\E[37;44mPC Mag\E[0;ma6\E[37;44m-HOST-\E[0;ma7\E[37;44msignat\E[0;ma8\E[37;44mEdPhon\E[0;m" ::the menu
lput "a9\E[37;44mS KEYS\E[0;ma0\E[37;44m \E[0;m"
lput "\E[u" :: restore cursor position
set f9 "@gosub shiftkeys" :: f9 calls no keys next
pn3 ::change normal color to blue
return
shiftkeys ::shift-func keys menu
pn15 ::make normal color WHITE
lput "\E[s" ::save cursor position
lput "\E[1;1f" ::move cursor to menu line
lput "s1\E[37;44m \E[0;ms2\E[37;44m \E[0;ms3\E[37;44mColors\E[0;ms4\E[37;44mTLearn\E[0;m" ::the menu
lput "s5\E[37;44mSearch\E[0;ms6\E[37;44m \E[0;ms7\E[37;44m \E[0;ms8\E[37;44m \E[0;m" ::the menu
lput "s9\E[37;44mC KEYS\E[0;ms0\E[37;44m \E[0;m"
lput "\E[u" :: restore cursor position
set f9 "@gosub ctrlkeys" :: f9 calls alt f keys next
pn3 ::change normal color to blue
return
ctrlkeys ::ctrl-func keys menu
pn15 ::make normal color WHITE
lput "\E[s" ::save cursor position
lput "\E[1;1f" ::move cursor to menu line
lput "c1\E[37;44mMenu^1\E[0;mc2\E[37;44m 2\E[0;mc3\E[37;44m \E[0;mc4\E[37;44m \E[0;m" ::the menu
lput "c5\E[37;44m \E[0;mc6\E[37;44m \E[0;mc7\E[37;44m \E[0;mc8\E[37;44m \E[0;m" ::the menu
lput "c9\E[37;44mNoKeys\E[0;mc0\E[37;44m \E[0;m"
lput "\E[u" :: restore cursor position
set f9 "@gosub nokeys" :: f9 calls shift keys next
pn3 ::change normal color to blue
return
nokeys: :: restore status line
cls; lput "\E[s" :: save cursor position
lput "\E[1;1f" :: move cursor to menu line
lput " "
:: erase to end of line
display nostat :: restore status line
lput "\E[u" :: restore cursor position
set f9 "@gosub fkeys" :: f9 calls f keys next
return
:: Code above demonstrates one way of displaying a HELP MENU using ANSI codes.
:: Many thanks to the original design by Mike Pearson and input by Ron Ottinger
:: Note: Some function keys are blank so you can add what *you* feel is
:: important -- remember whatever you add to the menu you must also add to the
:: key definitions earlier in the script...
:: What it does: (by pressing F9)
:: 1. Saves the current cursor position
:: 2. Moves cursor to top of screen
:: 3. Displays a FUNCTION KEY help menu.
:: 4. Puts the cursor back to its original position
:: 5. Sets F9 to the next FUNCTION KEY menu in the rotation.
:: --- Color Generation examples ---
color
cls; echo "\n\t\t\t \E[32m\E[41m >>> ANSI Color Calls <<< \n\n"
echo "Foreground:\n"
lput "\E[47m\E[30m\\E[30m\E[40m \E[31m\\E[31m \E[32m\\E[32m \E[33m"
lput "\\E[33m \E[34m\\E[34m \E[35m\\E[35m \E[36m\\E[36m \E[37m\\E[37m"
echo "\n\nBackground:\n"
lput "\E[40m\\E[40m \E[30m\E[41m \\E[41m \E[42m \\E[42m \E[43m \\E[43m "
lput "\E[44m \\E[44m \E[45m \\E[45m \E[46m \\E[46m \E[47m \\E[47m \n\n"
echo "Modifiers (primary green):\n \E[32m" :Switch foreground back to green
lput "\E[0mReset, Bold, Faint, Italics, Underline, Blinking,"
lput " Reverse, Invisible\n\r"
lput "\E[0m\\E[0 \E[1m\\E[1m \E[2m\\E[2m \E[3m\\E[3m\E[0m \E[4m\\"
lput "E[4m\E[0m \E[5m\\E[5m or \\E[6m \E[0m \E[7m\\E[7m\E[0m \\E[8m"
echo "\E[36m\E[21f\t\t Notice \\E[21f puts cursor on 21rd line...\E[23f"
return
:===========================================================================:
: --- Auto Logon Section --- :
oldguard cls; echo "\n\t\t Now calling Olde Guard at 1200 Baud \n\n"
ena -E -Z -8g :enaBLE Error ck, auto d/l, w graphics
nolog; speed 1200 :turn off log and set speed 1200 baud
goto number :Skip 300 baud dial
oldg24 cls; echo "\n\t\t Now calling Olde Guard at 2400 Baud \n\n"
ena -E -Z -8g :enaBLE Error ck, auto ZModem w graphics
nolog; speed 2400 :turn off log and set speed 2400 baud
number: bye :hang up modem
654-7817 :Direct line Olde Guard...
: 1-654-7817 :Toll call (commented out)
: 1-512-654-7817 :Long distance (outside San Antonio)
cls
: echo "\E[34m\n\n\t\t >>> Welcome to Olde Gurard BBS -- Please standby <<<"
: display inhibit :turns off display for opening setup...
:(use this to not show opening screens)
ena -E -Z -8g :enaBLE Error ck, auto ZModem w graphics
pat; pat 1i "ENTER" :Clear patterns and look for ENTER
wait :Wait for pattern
: put "\rn\ry\r\r" :REQUEST graphics and color
put "\r\r\r" :SKIP graphics and color
restime :Reset status clock (Yam Only)
pat 1i "right (y/N/why)?"
wait :wait for tcomm...
: display noinhibit :turn display back on if off
pat 1i "~~"; wait :Watch and for opening screen
put "\013" :Once found Ctrl-K out of it
pat 1i "ast name: " :Look for log in prompt
wait :Wait until prompt occurs
:: <*> Note you will have to log-on manually first to get a password on Olde
:: Guard... Since you don't have a password assigned, the line below
:: skips the rest of the auto log-on and hooks you to the this BBS.
:: When you have a name and password, add them in the 'putw' statement
:: BELOW and DELETE (or comment out) the NEXT line...
t; return : Abort auto-login until name assigned below.
:: ^^^^^^^^^:delete this after name/password loaded below!
putw "FIRST LAST NAME\rPASSWORD\r" :Enter name / password
:: --- Note comment out next four lines if you want bulletins ---
pat 2i "==" :Look for bulletin menu if turned on
wait :wait until found...
put \013 :Ctrl K to skip this menu
put "q\rm\r" :Drop to mail menu level to prevent timeout
:: >>> Alarm Section <<<
display nobell=visual :Turn bell back ON
lput "\r\n\n\t\t\E[33;1m Hit *BACKSPACE* key to \E[5;31mSTOP\E[0;33m alarm..."
: lput "\r\n\n\t\t Hit *BACKSPACE* key to STOP alarm..." :no ANSI
sleep 30 :3 sec for response before alarm
while "!k&&L<20" lput "\7\7" :For 20x and While nokey, make noise
if k goto bv :If keyhit then skip next call
:: Put other DOS noise making program here if you wish, for example
:: !sound (note the '!' will execute DOS programs from inside script)
bv: cls; display bell=visual :space and quiet bell
put "r\r" :Prepare to read mail...
pf30 :Reset search wait (30 sec)
kill :Clear circular buffer
restime :Reset the timer (YAM only)
: create -s+ %tmp\mail%d.log :sTRIP Ctrl, append date file
::^If today was 5/25/90 this makes a file in c:\comm\temp
:: called mail0525.log -- If you need to use a DOS program on
:: this filename use the syntax @!% [DOS program] mail%d.log
:: to force YAM/ZComm to fill in the date before passing to DOS
: cd %tmp :Change directory to d/l area
:: Three lines below show how to check for connection to host system
:: every 3 seconds. Once connection is lost you are returned to YAM
:: command-line. This is a useful piece of code if you wanted to have
:: a call placed from a DOS menu and return to DOS menu when call
:: completed. If this the case you would replace 'return' with 'off'
:: and have YAM/ZComm return to DOS after this call complete.
: pf3 : set pattern fail time to 3 seconds
: while c wait : While connected just wait here...
: return : once no carrier, return to command line.
: if this statement 'off' then returns to DOS
t : activate terminal mode
return : return from script mode
:---------------------------------------------------------------------------:
: --- Second example of an auto logon script --- :
CIS12 cls; bye :Note -- CIS in caps so won't be called by mistake
echo "\t\t\tNow accessing CompuServe at 1200 baud...\n\n "
speed 1201 435-3883 :Odd number, 2 stop bits, error trap
goto cislog :Goto logon section of CIS script
cis cls; bye; echo "\t\t\tNow accessing CompuServe at 300 baud...\n\n "
speed 300 435-3883
cislog: sleep 20 :Sleep for 2 seconds
ena -E -7e : put into Error correcting 7 bit, even parity...
echo ""; echo "Sending ^C"; put \3 :Send Ctrl-C, echo doing it.
pattern 1i ID: :Wait for ID
wait :"i" causes immediate release
putw "77770,101\r" :Enter Account (can be yours)
pat 1i word: :Wait for password prompt
wait
putw "FREE-DEMO\r" :Enter password for demo...
kill :Kill initial login text
restime :Reset status timer (yam only)
: create -s+ %tmp\cis.log :sTRIP hi-bit, append data file
: cd %tmp :Change directory to d/l area
:Set: fULL duplex, B proto, strip ctrl char, don't pAUSE for (CR)
ena -fcs!p
t :activate terminal mode
return
: --- End of Auto Log Examples --- :
: -------------------------------------------- :
:=============================================================================:
: :
:: Note: This is a "hands-on" script. It only incorporates two "auto :
:: logon" examples which show how to write an auto logon script. :
:: One example runs an auto logon to Olde Guard BBS here in SA Texas :
:: and the other gets you into the demo area of CompuServe... :
:: :
:: The Olde Guard is currently operating under the TComm remote :
:: access system software, so the auto logon script has to "see" :
:: questions asked by that system and answer them. Other BBS :
:: systems present a different "face" when you log on, so auto :
:: logon scripts for other systems will differ somewhat. :
:: :
:: The normal single line phone directory entries in the directory :
:: below were created with an ASCII text editor. Executing those :
:: entries will place ZComm into terminal mode w/graphics enabled :
:: as soon as a connect is made. This works well for making calls :
:: and gives you full control of the logon process following a :
:: connect. However, if you want to develop automatic logon :
:: scripts, you will need to comment out or delete the entries :
:: following the ';' in the directory examples below (e.g. place :
:: a colon and a space in between the ';' and 't -8g'), and then :
:: make 't -8g' the final entry in the auto logon routine. :
:: :
:: The reason for this is that placing ZComm into terminal mode by :
:: entering 't' stops script pattern searches. Examples of auto :
:: logon scripts may be found in Chuck Forsberg's phone scripts :
:: that are distributed with ZComm, and the ZComm manual explains :
:: how such auto logon scripts are constructed and how to use the :
:: TurboLearn(tm) feature to automate writing scripts. I recommend :
:: that new ZComm users use this script essentially "as is" for :
:: a while to test your new phone directory entries and become :
:: familiar (comfortable) with 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 a simple example script to use in learning :
:: basic ZComm functions. You will have plenty of time to enhance :
:: and embellish this script later. :
:: :
:: <<< comments courtesy of Bob Willoughby >>> :
:: :
:: Remember... those items starting with ":" are commented out :
:: :
:=============================================================================:
:: --- Some San Antonio Bulletin Boards using simple Phone Directory ---
apco24 bye; speed 2400 496-5558 ena -E;t -8g :membership board #
apco12 bye; speed 1200 496-5558 ena -E;t -8g
public bye; speed 1200 434-1557 ena -E;t -8g :APCO public BBS
south bye; sp 1200 656-3790 ena -E;t -8g :Southern Cross BBS
sahug bye; sp 1200 341-0586 ena -E;t -8g :Zenith Group
mac bye; sp 1200 533-7509 ena -E;t -8g :MAC users group
teachers_lounge bye; sp 1200 344-7470 ena -E;t -8g
:: Note to users -- Some of the above San Antonio bulletin boards operate
:: at speeds higher than 1200 baud. If you have a 2400 baud modem, just
:: edit the 'speed 1200' to read 'speed 2400' as appropriate in the above
:: directory. Want to add other favorites? Just add them in with an ASCII
:: text editor using the above as example entries. It's easy!
:: --- Some Classic BBS systems ---
buerg24 bye; sp 2400 1-707-778-8944 ena -E;t -8g :Vern Buerg's BBS
buerg12 bye; sp 1200 1-707-778-8944 ena -E;t -8g
jordan24 bye; sp 2400 1-301-428-7931 ena -E;t -8g :Larry Jordan
jordan12 bye; sp 1200 1-301-428-7931 ena -E;t -8g
genie12 bye; sp 1200 226-6513 ena -hs;t :GE Network (San
genie24 bye; sp 2400 271-0538 ena -hs;t : Antonio number)
pcmag bye; sp 1200 1-212-696-0360 ena -E;t -8g :PC Magazine BBS
pctech bye; sp 1200 1-301-576-7285 t :PC Tech Journal
virusinfo sp 2400 %l,408-988-4004 ena -E;t -8g :John McAfee Viruscan -voice
408-988-3832
:: -=- End of simple phone directory entries -=-
:=============================================================================:
:: Generate a script with TurboLearn Script Writer(TM)
:: Hit Shift-F4 to start this...
tlearn set fc10 "" :: telephone number, and flag that telno was entered
if c goto connected
cls
accept fc10 "Enter Telephone Number "
ag1: accept fa1 "Enter Speed (300, 1200, 2400) "
if ifa1,2400 speed 2400 goto ag2
if ifa1,1200 speed 1200 goto ag2
if ifa1,300 speed 300 goto ag2
echo "Bad speed"; goback ag1
ag2: lput "\r\n1 - System uses IBM PC (ANSI) line drawing characters\r\n"
lput "2 - System uses 7 bits even parity\r\n"
lput "3 - System uses 8 bits No parity (8n1)\r\n"
lput "\r\n"
acceptl1 fa2 "Choose one of the above: "
lput "\r\n"
ena -8n
@%fc10
if !c echo "Sorry, no connection"; return
set fa5 ""
if ifa2,1 ena -8g; set fa5 "ena -8g"
if ifa2,2 ena -7e; set fa5 "ena -7e"
connected:
echo "Finish with F1. Use ALT-B to send a break if necessary"
learn -y tlrn.tmp
cn2: if !r echo "WARNING: Learning (recording) terminated prematurely!"
close
kill
create newscr.t
if !r abort
echo "Is this to become a Telephone Directory entry (y/n)?"
if !y goto nodir
accept fa6 "What directory entry name to use? "
echoc "%fa6 speed %fa1 %fc10 %fa5"
nodir: close; set fa2 ""
echo "Should the script disconnect the phone line (y/n) ?"
if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
set fa2 "bye; return"
echo "Should the script then exit to the Operating System (y/n)?"
if y set fa2 "off"
!tlearn -r tlrn.tmp >>newscr.t
create -+ newscr.t; echof " %fa2"; close
scdone: echo "Your new script is in the file 'newscr.t' !!"
if %fc10 echo "You may add this file to your Telephone Directory"
if %fc10 echo "Or execute it with 'call %fa6.newscr.t'"; return
echo "You may execute this file with 'source newscr.t'"
return
:=============================================================================:
:: --- Using YAM/ZComm in HOST MODE ---
:: Note that for maximum -security- have this section be another file
:: so users won't see your passwords.
:: YAM users can comment in 'demand %password' at end of file
host cls; echo " Activating host mode operation... Stand by!\n\n"
sp 2400
: sp 1200 : use for 1200 baud host modem...
: set home "/HOST" : Optional restricted directory
:: The above command can force users into a specific area on disk. It
:: CRITICAL you use "/" NOT a "\" in this command. This will lock users
:: into that directory and its subdirectories. If you use this
:: command, you MUST have your welcome and xhelpfile as a different
:: file and this file MUST be in the directory specified by the 'set
:: home' command. To function it MUST be a READ ONLY file. You may
:: use HOSTHELP.TXT for this purpose but it will need to rename to
:: HOSTHELP.T. Remember you will also need to add some starting
:: labels and utilize new 'set welcome' and 'set xhelpfile' commands.
set welcome "@gosub welcome./comm/phodir.t" : setup Welcome
set messages "/comm/messages" : setup file for messages
:: Private should set to another directory so people won't see
:: private messages.
set private "/comm/pmessage" : Setup private message area
:: Normally section below would be in another file so people could NOT
:: view your passwords. For testing you can get around this by assigning
:: your script a READ-ONLY, HIDDEN attributes. For YAM users wanting to
:: use the 'demand %password' option, the file CAN NOT have a HIDDEN
:: attribute so you MUST put this in another directory that users can't
:: access for protection.
set password "xxxxxxxx" : CHANGE THIS Access Password
set unrestrict "xxxxxx" : WARNING - CHANGE THIS DOS drop PASSWORD!!
:: <*> -- HOST Helpfile Defined Below --
set xhelpfile "@gosub help./comm/phodir.t" : Custom help 17.29+
: set xhelpfile "@type hosthelp.txt>com1" : (older versions)
:^^^^ set this for com1 or com2
: Notice this is an EXTERNAL file!
set disks "abc" : Setup restricted disk area
set call1 "ATZ\r\336\336ATZ\r\336\336" :prepare to answer phone...
set call2 "ATZ\r\336\336ATM1X1S0=1\r\336ATM1X1S0=1\r\336\336"
: Note 'call3' below would normally be a command that
: requires quotes around it, but it includes a quoted string
: so you MUST use this alternate form of the set command to
: have the actual command start at COL #1 of the next line.
: <<< This works with YAM only...>>>
: set call3
: @echo "\t\t Now awaiting incoming calls... Press F1 to exit.\n\n"
set answerback "\r\nYOUR NAME HERE...\r\n\21"
set outahost "@pk512; putw ATE1V1X1S7=60S8=1S11=50S0=0\r;pwd; gosub menu"
set baudstr "@gosub baud" : sub below to find speed
pc60 : callout interval = 60 sec
host
: >>> Check for Caller Speed <<<
baud pat 1 "CONNECT\r\n"; pat 2 "NO CARRIER"
pat 3 "CONNECT 1200\r\n"; pat 4 "CONNECT 2400\r\n"
pe-20
wait -Ef25
dis -E
if 1 speed 300 return
if 3 speed 1200 sleep 20 return
if 4 speed 2400 sleep 20 return
kill create -+ rings
close
fail
welcome:
:In HOST mode, below is what the user will see on login
echo " >>> Welcome to YAM/ZCOMM Host Mode <<< "
: demand %password :YAM users may comment this in to request password
:: The 'demand' command is only available in YAM and NOT in ZComm...
:: If you are using ZComm there is no way to restrict initial access
:: like you can with YAM. ZComm CAN will RESTRICT access to DOS if
:: user doesn't know the password ...
help: :Note this is also the help message...
echo " "
echo " The thing to remember is that when you see the prompt followed "
echo " by [HOST] it is like you are actually sitting at the host "
echo " terminal... To execute commands on your own YAM/ZComm hit F1 "
echo " to call your local terminal program... "
echo " "
echo " To open access to the complete disk enter the command: UNRESTRICT "
echo " and then use the system password -- otherwise you will remain in "
echo " the C:\\comm directory or one of its subdirectories. "
echo " "
echo " To see the files on the host enter: 'dir' and hit return. "
echo " "
echo " TO DOWNLOAD a file from the host enter 'sz filename' (wildcards OK) "
echo " (Remember this is just like typing at the HOST keyboard...) "
echo " - For XMODEM enter 'sx filename' at HOST prompt - "
echo " - For KERMIT enter 'kermit sb filename' at Host prompt - "
echo " "
echo " TO UPLOAD a file hit F1 to get into your terminal command mode and "
echo " then enter 'sz filename'. In ZModem everything else is automatic. "
echo " XMODEM enter 'rx filename' or 'rc filename' for CRCX at HOST prompt "
echo " - KERMIT enter 'kermit rb' at HOST prompt then start your upload - "
echo " "
echo " To leave a MESSAGE enter the command 'message' and follow prompts. "
echo " ---> To see this message anytime enter the command 'help' <--- "
: +++++++++++++++++++++++++++++--- That's it ---++++++++++++++++++++++++++++++