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 / QT41D128.LZH / SCRIPTS.QTM < prev    next >
Text File  |  1989-04-06  |  8KB  |  245 lines

  1. People have asked for some sample chat scripts, so here are a few.
  2.  
  3. Firstly, simple dialin chat scripts for a HAYES modem, for the CASTLE,
  4. the BOSKUG Kaypro board, The new BOSKUG board, and Jay Sage's Znode.
  5. These are all prime examples of chat scripts at work.
  6.  
  7. Out of common sense I have made the passwords all XXXXXXXX, edit the
  8. name & password fields to suit.
  9.  
  10. CASTLE.SCR
  11. --------------------------------------------------------------
  12. !b1200 8n1 -4
  13. !l0
  14. %AT\r%OK\r\n%2%5%
  15. %ATDT8253135\r%CONNECT 1200%30%
  16. %%(y/N) ? >> %
  17. %\r%FIRST name> %30%
  18. ~david\r~LAST name> ~
  19. ~goodenough\r~Password> ~
  20. ~XXXXXXXX\r~\r\n\r\n~
  21. %\013%inue...%
  22. % %(Y/n) ? >> %
  23. %\r%%
  24. --------------------------------------------------------------
  25.  
  26. BOSKUG.OLD
  27. --------------------------------------------------------------
  28. !b1200 8n1 -2 25 500
  29. !l0
  30. %AT\r%OK\r\n%2%5%
  31. %ATDT2886477\r%CONNECT 1200%30%
  32. %%inue: %
  33. %\r%\r\n%
  34. %\013%name\r%
  35. %david goodenough\r%word\r%
  36. %XXXXXXXX\r%%
  37. --------------------------------------------------------------
  38.  
  39. BOSKUG.NEW
  40. This is tested a couple of times, but I'm not sure I have ALL
  41. the bugs out. Muck with it as you need to.
  42. --------------------------------------------------------------
  43. !b1200 8n1 -4
  44. !l0
  45. %AT\r%OK\r\n%2%5%
  46. %ATDT9657046\r%CONNECT 1200%30%
  47. %%=no? %30%
  48. %\r%first name? %
  49. %David\r%last name? %
  50. %Goodenough\r%echo)? %
  51. %XXXXXXXX\r%yes? %
  52. %\r%inue? %
  53. %\r%inue? %
  54. %\r%%
  55. --------------------------------------------------------------
  56.  
  57. ZNODE.SCR
  58. --------------------------------------------------------------
  59. !b1200 8n1
  60. !l0
  61. %AT\r%OK\r\n%2%5%
  62. %ATDT9657259\r%CONNECT 1200%30%
  63. %%(0-9)? %
  64. %0\r%=====%
  65. %\3%word: %
  66. %DDT\r%come%
  67. %\3%ETIN%
  68. %\3%/%
  69. %\3%name ? %
  70. %David\r%over]   ? %
  71. %Goodenough\r%%
  72. --------------------------------------------------------------
  73.  
  74. Now, that deals with dialing in. I also use QTERM to read mail
  75. in one big gulp, so I can process it off line. I do all my
  76. BBS mail work on drive D2: so that's why D2: is specified in
  77. all the filenames. Again, you can edit for your own personal
  78. taste. .RMA files are 'Read MAil' files - the stuff is put in
  79. a .MAI file for mail
  80.  
  81. CASTLE.RMA
  82. The CASTLE is slow responding to a ^S. so we make QTERM wait 4
  83. seconds before doing anything.
  84. --------------------------------------------------------------
  85. !b -4
  86. %\r%menu)> %8%4%
  87. ~r;s;c~~
  88. !f d2:castle.mai 6 \r
  89. --------------------------------------------------------------
  90.  
  91. KUG-OLD.RMA
  92. Here's one for the OLD BOSKUG board
  93. --------------------------------------------------------------
  94. !b -2
  95. %\x14%U,Y or ?  %4%4%
  96. %\dr%:  %
  97. %*%%
  98. !f d2:kug-old.mai 6 \r
  99. --------------------------------------------------------------
  100.  
  101. KUG-NEW.RMA
  102. Here's one for the NEW BOSKUG board. Again this is not too
  103. tested, but works on a good day
  104. --------------------------------------------------------------
  105. !b -2
  106. %\r%mand? %12%4%
  107. %r s ns%%
  108. !f d2:kug-new.mai 6 \r
  109. --------------------------------------------------------------
  110.  
  111. OK we've got the stuff. Now how about answering. I put my answers
  112. in .YYY files, so if I was writing Joe User I'd put the
  113. text of the letter in D2:JU.YYY. The chat script here assumes that
  114. the letter ends with ONE (exactly one) newline, i.e. just as if
  115. you'd edited it with a file. I'd tend to suggest being very careful
  116. about WordStar & VDE as they do cruel things with Bit 7 of characters
  117. Try a PIP .... = ....[Z] just before transmission.
  118. .WMA files are 'Write MAil' files
  119.  
  120. CASTLE.WMA
  121. --------------------------------------------------------------
  122. !b -4 20 300
  123. ~\r~menu)> ~8~4~
  124. ~E\r~ALL)> ~
  125. ~Joe User\r~ject> ~
  126. ~Subject of this letter\r~1> ~
  127. !pd2:ju.yyy
  128. ~\r~<?>> ~
  129. ~S\r~(y/N) ? >> ~12~
  130. ~Y\r~~
  131. --------------------------------------------------------------
  132.  
  133. Now the sneaky thing about this is that you can glue multiple
  134. copies of this file end to end (no need for the !b line every time)
  135. for sending several files.
  136.  
  137. KUG-OLD.WMA
  138. --------------------------------------------------------------
  139. !b -2 25 500
  140. %\x14%U,Y or ?  %4%4%
  141. %\de%<ret> for ALL\r%
  142. ~Joe User\r~<ret> to exit\r~
  143. ~SUBJECT goes here\r~1: ~
  144. !pd2:ju.yyy
  145. %\r%List:  %
  146. %s%ea #: %
  147. %AREA#%%
  148. %%%
  149. %1. Chit-Chat%%
  150. %2. Computer%%
  151. %3. CP/M%%
  152. %4. MS-DOS%%
  153. --------------------------------------------------------------
  154.  
  155. OK, this is a bit odd. I can never remember the areas, so I have
  156. added comments to the file. Since QTERM stops chatting when it hits
  157. a line with both an empty send and expect section, the %%% line
  158. causes it to stop. The next four lines are comments: QTERM merrily
  159. tries to parse these, and succedes, but never executes them so it
  160. doesn't matter. If you're gluing multiple copies, it's best to edit
  161. out the %%% and %1. etc. lines once you have the area numbers filled
  162. in.
  163.  
  164. Now the coup de grace. This should give you an idea of where QTERM
  165. really can stand head and shoulders above the rest. This script dialed
  166. into the castle, sent two messages, read all waiting mail, transferred
  167. to the files section, uploaded two files, added the descriptions, and
  168. then logged me off again. I just typed:
  169.  
  170. b:qterm d2:castle.all
  171.  
  172. and QTERM did the rest. (At no time did my fingers leave my hands :-) )
  173.  
  174. CASTLE.ALL                Comments here
  175. --------------------------------------------------------------
  176. !b1200 8n1 -4 20 300        ; set baud rate, ^S delay & transfer speed
  177. !l0                    ; turn off <lf> in !p sends
  178. %AT\r%OK\r\n%2%5%            ; get the modem's attention
  179. %ATDT8253135\r%CONNECT 1200%30%        ; dial & wait to connect
  180. %%(y/N) ? >> %
  181. %\r%FIRST name> %30%            ; start login operation
  182. ~david\r~LAST name> ~
  183. ~goodenough\r~Password> ~        ; send both parts of my name
  184. ~XXXXXXXX\r~\r\n\r\n~            ; and my password (which is not X's)
  185. %\013%inue...%                ; now send a ^K
  186. % %(Y/n) ? >> %
  187. %\r%%
  188. %\r%menu)> %8%4%            ; finish by getting to a menu
  189. ~E\r~ALL)> ~                ; E for enter a message
  190. ~SYSOP\r~ject> ~            ; to the SYSOP
  191. ~ROGUE.LBR & ROGUE.ARC\r~1> ~        ; what it's about
  192. !pd2:dh.yyy                ; now send the message from a file
  193. %\r%<?>> %
  194. ~S\r~(y/N) ? >> ~12~
  195. ~Y\r~~                    ; complete the message send
  196. ~\r~menu)> ~8~4~            ; do it again for another message
  197. ~E\r~ALL)> ~
  198. ~SYSOP\r~ject> ~            ; also to the sysop
  199. ~QTERM.LBR and CP/M SYSOP\r~1> ~
  200. !pd2:dh1.yyy                ; out it goes
  201. ~\r~<?>> ~
  202. ~S\r~(y/N) ? >> ~12~
  203. ~Y\r~~                    ; finish the send
  204. %\r%menu)> %8%4%            ; get the menu prompt back again
  205. ~r;s;c~~                ; r;s;c reads all new mail
  206. !f d2:castle.mai 6 \r            ; !f it into a file
  207. ~\r~menu)> ~8~4~            ; all done - back to the menu
  208. ~F~~                    ; move to the files area
  209. ~\r~menu)> ~8~4~            ; get to a menu again
  210. ~RB\r~...~30~                ; do a receive batch
  211. ~~C~                    ; get the first 'C' to sync
  212. !s xky b:qterm40.lbr            ; and send the file
  213. ~~\r\n> ~                ; wait for a prompt
  214. ~QTERM 4.0 terminal program. Generic~~    ; send the description: this has to go
  215. ~ version, can be patched\r~(Y/n) ? >> ~; in two parts as we are limited in
  216. ~Y\r~menu)> ~                ; line length
  217. ~CPM~~                    ; put this in the CPM area
  218. ~\r~menu)> ~8~4~            ; and back to the menu (yet again)
  219. ~RB\r~...~30~                ; sending another
  220. ~~C~
  221. !s xky b:qt-kp.lbr            ; off the file goes
  222. ~~\r\n> ~
  223. ~QTERM 4.0 terminal program. Kaypro~~    ; add a description
  224. ~ specific version\r~(Y/n) ? >> ~
  225. ~Y\r~menu)> ~
  226. ~CPM~~                    ; CPM file again
  227. ~\r~menu)> ~                ; back to a menu (last time :-) )
  228. ~G;Y;N\r~...~                ; log off
  229. ~\d\d\d\d~~                ; delay a while
  230. !,                    ; hang up the phone
  231. !a                    ; and beep me
  232. --------------------------------------------------------------
  233.  
  234. OK, I confess this is one momma big chat script, but it shows what
  235. QTERM is capable of doing, _PROVIDED YOU WORK WITH THE SEND/EXPECT
  236. MECHANISM_. Be aware you are limited to 63 lines in a chat script:
  237. the above is pretty close to that: it's 56 lines. Also I didn't
  238. just dream that up: I dialed into the CASTLE, and used a ^\ C catch
  239. to get the syntax of everything I needed to do in that chat script.
  240. Then I just worked it over with an editor. Perhaps one day I'll give
  241. a quick session on QTERM chat scripts as a SIG section at a BOSKUG
  242. meeting. Drop me E-mail if you're interested, or if you have any
  243. questions. The .SCR, .RMA, and .WMA scripts should be enough to get
  244. started.
  245.