home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
CPM
/
TERMS
/
QTERM41E.LBR
/
SCRIPTS.QZM
/
SCRIPTS.QTM
Wrap
Text File
|
2000-06-30
|
8KB
|
245 lines
People have asked for some sample chat scripts, so here are a few.
Firstly, simple dialin chat scripts for a HAYES modem, for the CASTLE,
the BOSKUG Kaypro board, The new BOSKUG board, and Jay Sage's Znode.
These are all prime examples of chat scripts at work.
Out of common sense I have made the passwords all XXXXXXXX, edit the
name & password fields to suit.
CASTLE.SCR
--------------------------------------------------------------
!b1200 8n1 -4
!l0
%AT\r%OK\r\n%2%5%
%ATDT8253135\r%CONNECT 1200%30%
%%(y/N) ? >> %
%\r%FIRST name> %30%
~david\r~LAST name> ~
~goodenough\r~Password> ~
~XXXXXXXX\r~\r\n\r\n~
%\013%inue...%
% %(Y/n) ? >> %
%\r%%
--------------------------------------------------------------
BOSKUG.OLD
--------------------------------------------------------------
!b1200 8n1 -2 25 500
!l0
%AT\r%OK\r\n%2%5%
%ATDT2886477\r%CONNECT 1200%30%
%%inue: %
%\r%\r\n%
%\013%name\r%
%david goodenough\r%word\r%
%XXXXXXXX\r%%
--------------------------------------------------------------
BOSKUG.NEW
This is tested a couple of times, but I'm not sure I have ALL
the bugs out. Muck with it as you need to.
--------------------------------------------------------------
!b1200 8n1 -4
!l0
%AT\r%OK\r\n%2%5%
%ATDT9657046\r%CONNECT 1200%30%
%%=no? %30%
%\r%first name? %
%David\r%last name? %
%Goodenough\r%echo)? %
%XXXXXXXX\r%yes? %
%\r%inue? %
%\r%inue? %
%\r%%
--------------------------------------------------------------
ZNODE.SCR
--------------------------------------------------------------
!b1200 8n1
!l0
%AT\r%OK\r\n%2%5%
%ATDT9657259\r%CONNECT 1200%30%
%%(0-9)? %
%0\r%=====%
%\3%word: %
%DDT\r%come%
%\3%ETIN%
%\3%/%
%\3%name ? %
%David\r%over] ? %
%Goodenough\r%%
--------------------------------------------------------------
Now, that deals with dialing in. I also use QTERM to read mail
in one big gulp, so I can process it off line. I do all my
BBS mail work on drive D2: so that's why D2: is specified in
all the filenames. Again, you can edit for your own personal
taste. .RMA files are 'Read MAil' files - the stuff is put in
a .MAI file for mail
CASTLE.RMA
The CASTLE is slow responding to a ^S. so we make QTERM wait 4
seconds before doing anything.
--------------------------------------------------------------
!b -4
%\r%menu)> %8%4%
~r;s;c~~
!f d2:castle.mai 6 \r
--------------------------------------------------------------
KUG-OLD.RMA
Here's one for the OLD BOSKUG board
--------------------------------------------------------------
!b -2
%\x14%U,Y or ? %4%4%
%\dr%: %
%*%%
!f d2:kug-old.mai 6 \r
--------------------------------------------------------------
KUG-NEW.RMA
Here's one for the NEW BOSKUG board. Again this is not too
tested, but works on a good day
--------------------------------------------------------------
!b -2
%\r%mand? %12%4%
%r s ns%%
!f d2:kug-new.mai 6 \r
--------------------------------------------------------------
OK we've got the stuff. Now how about answering. I put my answers
in .YYY files, so if I was writing Joe User I'd put the
text of the letter in D2:JU.YYY. The chat script here assumes that
the letter ends with ONE (exactly one) newline, i.e. just as if
you'd edited it with a file. I'd tend to suggest being very careful
about WordStar & VDE as they do cruel things with Bit 7 of characters
Try a PIP .... = ....[Z] just before transmission.
.WMA files are 'Write MAil' files
CASTLE.WMA
--------------------------------------------------------------
!b -4 20 300
~\r~menu)> ~8~4~
~E\r~ALL)> ~
~Joe User\r~ject> ~
~Subject of this letter\r~1> ~
!pd2:ju.yyy
~\r~<?>> ~
~S\r~(y/N) ? >> ~12~
~Y\r~~
--------------------------------------------------------------
Now the sneaky thing about this is that you can glue multiple
copies of this file end to end (no need for the !b line every time)
for sending several files.
KUG-OLD.WMA
--------------------------------------------------------------
!b -2 25 500
%\x14%U,Y or ? %4%4%
%\de%<ret> for ALL\r%
~Joe User\r~<ret> to exit\r~
~SUBJECT goes here\r~1: ~
!pd2:ju.yyy
%\r%List: %
%s%ea #: %
%AREA#%%
%%%
%1. Chit-Chat%%
%2. Computer%%
%3. CP/M%%
%4. MS-DOS%%
--------------------------------------------------------------
OK, this is a bit odd. I can never remember the areas, so I have
added comments to the file. Since QTERM stops chatting when it hits
a line with both an empty send and expect section, the %%% line
causes it to stop. The next four lines are comments: QTERM merrily
tries to parse these, and succedes, but never executes them so it
doesn't matter. If you're gluing multiple copies, it's best to edit
out the %%% and %1. etc. lines once you have the area numbers filled
in.
Now the coup de grace. This should give you an idea of where QTERM
really can stand head and shoulders above the rest. This script dialed
into the castle, sent two messages, read all waiting mail, transferred
to the files section, uploaded two files, added the descriptions, and
then logged me off again. I just typed:
b:qterm d2:castle.all
and QTERM did the rest. (At no time did my fingers leave my hands :-) )
CASTLE.ALL Comments here
--------------------------------------------------------------
!b1200 8n1 -4 20 300 ; set baud rate, ^S delay & transfer speed
!l0 ; turn off <lf> in !p sends
%AT\r%OK\r\n%2%5% ; get the modem's attention
%ATDT8253135\r%CONNECT 1200%30% ; dial & wait to connect
%%(y/N) ? >> %
%\r%FIRST name> %30% ; start login operation
~david\r~LAST name> ~
~goodenough\r~Password> ~ ; send both parts of my name
~XXXXXXXX\r~\r\n\r\n~ ; and my password (which is not X's)
%\013%inue...% ; now send a ^K
% %(Y/n) ? >> %
%\r%%
%\r%menu)> %8%4% ; finish by getting to a menu
~E\r~ALL)> ~ ; E for enter a message
~SYSOP\r~ject> ~ ; to the SYSOP
~ROGUE.LBR & ROGUE.ARC\r~1> ~ ; what it's about
!pd2:dh.yyy ; now send the message from a file
%\r%<?>> %
~S\r~(y/N) ? >> ~12~
~Y\r~~ ; complete the message send
~\r~menu)> ~8~4~ ; do it again for another message
~E\r~ALL)> ~
~SYSOP\r~ject> ~ ; also to the sysop
~QTERM.LBR and CP/M SYSOP\r~1> ~
!pd2:dh1.yyy ; out it goes
~\r~<?>> ~
~S\r~(y/N) ? >> ~12~
~Y\r~~ ; finish the send
%\r%menu)> %8%4% ; get the menu prompt back again
~r;s;c~~ ; r;s;c reads all new mail
!f d2:castle.mai 6 \r ; !f it into a file
~\r~menu)> ~8~4~ ; all done - back to the menu
~F~~ ; move to the files area
~\r~menu)> ~8~4~ ; get to a menu again
~RB\r~...~30~ ; do a receive batch
~~C~ ; get the first 'C' to sync
!s xky b:qterm40.lbr ; and send the file
~~\r\n> ~ ; wait for a prompt
~QTERM 4.0 terminal program. Generic~~ ; send the description: this has to go
~ version, can be patched\r~(Y/n) ? >> ~; in two parts as we are limited in
~Y\r~menu)> ~ ; line length
~CPM~~ ; put this in the CPM area
~\r~menu)> ~8~4~ ; and back to the menu (yet again)
~RB\r~...~30~ ; sending another
~~C~
!s xky b:qt-kp.lbr ; off the file goes
~~\r\n> ~
~QTERM 4.0 terminal program. Kaypro~~ ; add a description
~ specific version\r~(Y/n) ? >> ~
~Y\r~menu)> ~
~CPM~~ ; CPM file again
~\r~menu)> ~ ; back to a menu (last time :-) )
~G;Y;N\r~...~ ; log off
~\d\d\d\d~~ ; delay a while
!, ; hang up the phone
!a ; and beep me
--------------------------------------------------------------
OK, I confess this is one momma big chat script, but it shows what
QTERM is capable of doing, _PROVIDED YOU WORK WITH THE SEND/EXPECT
MECHANISM_. Be aware you are limited to 63 lines in a chat script:
the above is pretty close to that: it's 56 lines. Also I didn't
just dream that up: I dialed into the CASTLE, and used a ^\ C catch
to get the syntax of everything I needed to do in that chat script.
Then I just worked it over with an editor. Perhaps one day I'll give
a quick session on QTERM chat scripts as a SIG section at a BOSKUG
meeting. Drop me E-mail if you're interested, or if you have any
questions. The .SCR, .RMA, and .WMA scripts should be enough to get
started.