home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / scrpthlp / SCRIPTHLP
Encoding:
Text File  |  1995-07-01  |  21.2 KB  |  666 lines

  1. # $Id: ScriptHelp 1.6 95/06/25 09:54:32 root Exp Locker: root $
  2.  
  3. ScriptHelp
  4. ==========
  5.  
  6. This help file applies to R.Orwin/A.P. Fitch slipdial script.
  7. Script file Revision 1.6
  8.  
  9. Contents
  10. --------
  11.  
  12. 1.0 Introduction
  13.  
  14. 2.0 Using the script
  15.  
  16. 3.0 Script Requirements
  17.  3.1 Modem Driver
  18.  3.2 Setting up your modem to transmit status messages
  19.  3.3 Making sure that TTFN etc have been "seen".
  20.  
  21. 4.0 Customizing the script
  22.  4.1 The contents of the configuration file, !slipdial.scripts.demconfg
  23.  4.2 To change the default dialler to Mercury.
  24.   4.2.1 To remove your Mercury PIN from a local number.
  25.  4.3 To Alter the Dialler Menu.
  26.  4.4 To Alter the List of Numbers
  27.  4.5 To Alter the Number of Retries.
  28.  4.6 To Change the Local Dialler Icon Number. 
  29.  
  30. 5.0 Some Frequently Asked Questions.
  31.  
  32. 6.0 Conclusions and Acknowledgements. 
  33.  
  34. 1.0 Introduction
  35. ================
  36.  
  37. This script was originally written by Rob Orwin.  I initially modified 
  38. to make it more readable, and also to learn the script language
  39. myself. Recently it has been customised to work with TTFN/Newsbase,
  40. and included in Dr. Alan Hassey's Internet Starter Pack for Acorn 
  41. Computers.
  42.  
  43. Changes made to version 1.5/1.6
  44. -------------------------------
  45.  
  46. The script has been largely re-written, mainly so that all
  47. configuration information is held in the file
  48. !slipdial.scripts.demconfg. So that new and old configuration files
  49. are not confused, the the configuration file is now called "demconfg"
  50. instead of "demonconfg".
  51.  
  52. The main advantage of these changes are 
  53.  
  54.    1) the script should start up faster
  55.    2) changes may be made to the phone numbers dialled without editing
  56.       the script (i.e. only demconfg has to be edited).
  57.       
  58. Two additional configuration options have been added 
  59.  
  60.    1) it is now possible to specify a number in the configuration file 
  61.       which will NOT have the mercury prefix added 
  62.    2) it is now possible to specify the default "local" number as a
  63.       completely separate item.  In the past, it was assumed that the
  64.       "local" number would not require a mercury prefix - this is not
  65.       always the case, so they have been made separate.
  66.  
  67. Finally, error reporting has been improved
  68.  
  69.    1) if the call fails due to not receiving the login, password, or 
  70.       protocol prompts, you will be told what caused the failure.
  71.  
  72.       
  73. 2.0 Using the script
  74. ====================
  75.  
  76. The script is placed in the !SlipDial.scripts directory.  You can
  77. either load it by dragging it and dropping it on the SlipDial icon bar
  78. icon, or you can set SlipDial up to run the script automatically.  You
  79. should read the SlipDial documentation file !SlipDial.!Help to
  80. understand this.
  81.  
  82. For the default setup with the starter pack, the scriptfile should be
  83. named
  84.  
  85. !SlipDial.scripts.demon
  86.  
  87. When the script is run for the first time, it asks for setup
  88. information and stores it in a configuration file.  This version of
  89. the script has  more information stored in the configuration file, and
  90. so may ask you for the information again, even if you have previously
  91. stored it.
  92.  
  93. There are a number of requirements for getting the script to work in
  94. the best way.  In particular, you need to
  95.  
  96. 1) make sure you are using the correct modem driver file
  97. 2) set up your modem to return certain messages
  98. 3) make sure that TTFN, NewsBase, and TCPIP have been "seen" by the filer
  99.  
  100. There are also a number of ways you can customise your setup.  The
  101. simplest ones are 
  102.  
  103. 1)  to change the default dialler to Mercury
  104. 2)  to alter the entries that appear on the menu for dialling
  105. 3)  to alter the default entries when dialling a list of phone numbers
  106. 4)  to alter the number of times SlipDial retries each number if the
  107.     line is busy 
  108. 5)  to change the local number 
  109.  
  110.  
  111. >From version 1.5 onwards of the script, these changes may be made by
  112. editing the file !slipdial.scripts.demconfg (known hereinafter as the
  113. "configuration file").
  114.  
  115. Note that to make changes to the script or the configuration, you
  116. simply have  to use a normal text editor, e.g. Edit.
  117.  
  118. With !SlipDial, there is a file called !SlipDial.scripts.DemonSpr,
  119. which  contains sprite definitions.  You must make sure you have the
  120. most up-to-date version of these sprites. If the file contains three
  121. sprites, you are ok - if it only contains 2, you should update it to
  122. the latest one by downloading it from demon ftp.
  123.  
  124. 3.0 Script Requirements
  125. =======================
  126.  
  127. 3.1 Modem Driver
  128. ----------------
  129.  
  130. The modem drivers are stored in the directory !SlipDial.Drivers. 
  131. There are examples for a number of modems.  The driver is  set when
  132. the configuration file is first stored (normally when you first run
  133. the script).  Simply answer the question wih the driver you wish to
  134. use.
  135.  
  136. 3.2 Setting up your modem to transmit status messages
  137. -----------------------------------------------------
  138.  
  139. If you run the script, and it appears to hangup after the call has got
  140. through but before TCPIP has started; or it doesn't recognise that the
  141. line is busy; then you need to make sure that the modem is returning
  142. messages indicating its (the modem's) status.  These messages are text
  143. strings, and their meaning is defined in the  driver file.  For
  144. instance, with the US Robotics Sportster modem, you need to send the
  145. setup string "X4" to enable all messages.
  146.  
  147. This means that when the modem detects the line is busy, it will
  148. return the string "BUSY".  You can tell the script to expect the
  149. string "BUSY" to indicate engaged by putting it in the modem driver
  150. file and assigning it to the script variable $busy. When dialling the
  151. modem looks for the string to see if it is equal to the contents of
  152. $busy and uses this to detect engaged lines.
  153.  
  154. The various possible strings, and their setups for a USR modem are
  155. shown in the example driver file below
  156.  
  157. set $init "ATB0E1F1M1Q0S7=30V1X4 AT&A2&B1&C1&D2&H1&I0 AT&K3&M4&N0&R2&S0&Y1"
  158. set $busy "BUSY"
  159. set $conn "CONNECT"
  160. set $nocarr "NO CARRIER"
  161. set $nodial "NO DIAL TONE"
  162.  
  163. The $init string is sent to the modem to set it up.  You will notice that
  164. the example above has X4 enabled.     
  165.  
  166. If you have a modem which returns different strings, you would have to 
  167. create your own modem driver.  For instance, if your modem returned
  168. "ENGAGED", you would have to modify the driver file to contain
  169.  
  170. set $busy "ENGAGED"
  171.  
  172. 3.3 Making sure that TTFN etc have been "seen".
  173. -----------------------------------------------
  174.  
  175. The script runs TTFN, Newsbase, and TCPIP automatically.  To do this,
  176. it needs to know where they are.  It can find them if you have opened
  177. a filer window with these programmes visible.  The  simplest way to
  178. ensure that they have been seen is to put all the internet related
  179. programmes in one directory.  Then when you open the directory in
  180. order to double-click SlipDial, you  know that all the other
  181. programmes have been seen.
  182.  
  183. 4.0 Customizing the Script
  184. ==========================
  185.  
  186. 4.1 The contents of the configuration file, !slipdial.scripts.demconfg
  187. ----------------------------------------------------------------------
  188.  
  189. A typical configuration file looks like this.
  190.  
  191. SP_DualPC               <-- the required block driver
  192. 0                       <-- port number
  193. 57600                   <-- computer to modem speed
  194. cycle                   <-- your host name
  195. password                <-- your password
  196. USR                     <-- the modem driver
  197. bt                      <-- telephone service provider 
  198. 131,999999999           <-- your mercury pin
  199. IsleOfWight             <-- menu entry 1 title
  200. 01983523306             <-- menu entry 1 phone number
  201. Reading                 <-- menu entry 2 title
  202. 01734284848             <-- menu entry 2 phone number
  203. London                  <-- menu entry 3 title
  204. 01813384848             <-- menu entry 3 phone number
  205. 01983523306             <-- the local (default) number
  206. 01983523306             <-- a number which should NOT be prefixed 
  207.                             with a mercury pin 
  208.  
  209. Normally this would be set up by running !DemConfg, if you use
  210. the Demon internet starter pack. However if you need to change
  211. something later, here is a description of what each option means.
  212.  
  213. 4.1.1 Block Driver
  214. ------------------
  215.  
  216. This is the block driver name. It should be set to match with your computer, and the type of modem lead you have attached. The available block drivers are 
  217.  
  218. Telnet
  219. SP_DualPC
  220. SP_Dual
  221. PipeB
  222. PipeA
  223. InternalPC
  224. Internal2
  225. Internal
  226. II_Dual
  227. Econet
  228.  
  229. The most important thing is to use the correct driver depending on
  230. whether you have a PC or Acorn wired serial lead. With a PC wired
  231. lead, you should use a driver ending in PC, e.g. InternalPC for an
  232. A5000. With an Acorn wired lead, you should use a driver which does
  233. NOT end in PC, e.g. Internal for an A5000. 
  234.  
  235. 4.1.2 Port number
  236. -----------------
  237.  
  238. This is only required if you have a serial interface with more than
  239. one serial port, for instance The Serial Port Dual Interface
  240. (SP_Dual), or an Intelligent Interfaces serial interface (II_Dual).
  241. You should set the value to the port number you which to use. For
  242. single port systems, the number should be 0.
  243.  
  244. 4.1.3 Computer to Modem speed
  245. -----------------------------
  246.  
  247. This should be set to as high a value as possible, depending on the
  248. serial port hardware you have. The value shown is suitable for
  249. SP_Dual.
  250.  
  251. 4.1.4 Host name.
  252. ----------------
  253.  
  254. Set this to your host name.  For my address (alan@cycle.demon.co.uk),
  255. the host name is cycle.
  256.  
  257. 4.1.5 Password
  258. --------------
  259.  
  260. Set this to your Demon password.
  261.  
  262. 4.1.6 Modem driver
  263. ------------------
  264.  
  265. Set this to be suitable for your modem. At the time of writing, the
  266. following Modem Drivers are available 
  267.  
  268. ATZ          = ATZ (should initialise anything!)
  269. USR          = Miracom or Sportster 14k4
  270. Courier      = Simple driver which works with most USR Courier modems
  271. Courier28k   = Driver for USR Courier V34 28k8 modems
  272. Supra14k4    = SupraFax14k4 driver
  273. Zoom14k4     = Zoom 14k4 driver
  274.  
  275. Check inside the directory !slipdial.drivers for latest information.
  276.  
  277. 4.1.7 Telephone Service Provider
  278. --------------------------------
  279.  
  280. This should be set to 'bt' or 'mercury'. It may be set from a menu on
  281. the icon bar when slipdial is running.
  282.  
  283. 4.1.8 Mercury Pin
  284. -----------------
  285.  
  286. This should be set to the access code for mercury. For instance to use
  287. the Mercury 131 service, you should dial 131, pause, and then send
  288. your pin. With a Hayes compatible modem you may pause by putting a
  289. comma ',' in the dial string, e.g.
  290.  
  291. 131,999999999
  292.  
  293. The comma causes a 2 second pause. 
  294.  
  295. 4.1.9 Menu entries
  296. ------------------
  297.  
  298. The next six lines allow three menu entries to be setup for dialling
  299. to Demon Points of Presence (PoPs). At the time of writing, the
  300. following PoPs were available
  301.  
  302. Birmingham
  303. 01212754848
  304. Bradford
  305. 01274755066
  306. Bristol
  307. 01179814848
  308. Cambridge
  309. 01223576010
  310. Cardiff
  311. 01222274848
  312. Coventry
  313. 01203284848
  314. Edinburgh
  315. 01315528883
  316. Gloucester
  317. 01452354848
  318. Hull
  319. 01482495580
  320. IsleOfWight
  321. 01983523306
  322. Leeds
  323. 01132984848
  324. Leicester
  325. 01162904848
  326. Liverpool
  327. 01512104848
  328. London
  329. 01813384848
  330. Luton
  331. 01582644848
  332. Manchester
  333. 01613854848
  334. Newcastle
  335. 01912474848
  336. Nottingham
  337. 01159544848
  338. Preston
  339. 01772484848
  340. Reading
  341. 01734284848
  342. Saffron
  343. 01799506010
  344. Sheffield
  345. 01142384848
  346. Sunderland
  347. 01915225005
  348. Wolverhampton
  349. 01902464848       
  350.  
  351. You must have three PoPs defined in the configuration file. These
  352. should be in order of which one is closest to you. The three together
  353. are used if you select the "list" menu option for dialling (see
  354. below).
  355.  
  356. Please note: the text title of the PoP may be anything you like, but
  357. it must be less than 12 characters long!
  358.  
  359. 4.1.10 Local (preferred) number
  360. -------------------------------
  361.  
  362. This entry should be set to the number of your nearest (and hence
  363. cheapest) PoP.
  364.  
  365. 4.1.11 No Mercury Pin number
  366. ----------------------------
  367.  
  368. This should be set to the number to which you DON'T want to have your
  369. mercury pin added. If you want to have your Mercury pin added to ALL
  370. numbers, set this to 0.
  371.  
  372. 4.2 To change the default dialler to mercury.
  373. ---------------------------------------------
  374.  
  375. Press the "menu" (middle) mouse button over the BT/Mercury icon.  Select
  376. the service provider you wish to use.  The icon will change to show 
  377. a BT or Mercury logo depending on which one you selected.  Now press
  378. menu over the same icon, and select the option "Save Default".
  379.  
  380. Your selected default (mercury or bt) is stored in the configuration
  381. file (!SlipDial.Scripts.demconfg).
  382.  
  383. 4.2.1 To remove your Mercury PIN from a local number.
  384. -----------------------------------------------------
  385.  
  386. If you have a Mercury PIN which is only required for long distance
  387. calls, you may have to remove the PIN from your local number.
  388.  
  389. To change this, you must modify the configuration file. You should
  390. enter the number to which you DO NOT want your mercury pin added as
  391. the last line of the file (see example above). If you DO want your
  392. mercury pin prefixed on ALL numbers, set the last line of the file to
  393. 0. 
  394.  
  395. Note: if you select bt as your telephone provider, this entry is
  396. ignored and you do not need to touch it at all.
  397.  
  398. 4.3 To Alter the Dialler Menu.
  399. ------------------------------
  400.  
  401. The dialler menu has a selection of three 'phone numbers from the
  402. available numbers at the time the script was written. You may change
  403. this selection by editing the configuration file,
  404. !slipdial.scripts.demconfg. See section 4.1.9 above. For instance, you
  405. can change the file to 
  406.  
  407. SP_DualPC
  408. 0
  409. 57600
  410. cycle
  411. password
  412. USR
  413. mercury
  414. 131,999999999
  415. London
  416. 01813384848
  417. Luton
  418. 01582644848
  419. Manchester
  420. 01613854848
  421. 01813384848
  422. 0
  423.  
  424. to make London, Luton, and Manchester options on the dialler menu.
  425. Setting 0 in the last line means that the mercury pin will be used on
  426. all numbers. London has been set as the preferred number (second from
  427. last line). The "List" option will dial London, then Luton, then
  428. Manchester in that order.
  429.  
  430.  
  431. 4.4 To Alter the List of Numbers
  432. --------------------------------
  433.  
  434. The script has a dialler menu option "List" which dials a sequence of
  435. phone numbers. This dials your three specified 'phone numbers in
  436. sequence. The order of dialling is set by the order the numbers appear
  437. in the !slipdial.scripts.demconfg file.
  438.  
  439.  
  440. 4.5 To Alter the Number of Retries.
  441. -----------------------------------
  442.  
  443. For each phone number, there is a subroutine.  These subroutines are
  444. called dial1, dial2, dial3, diallocal, and List. For instance for your
  445. first number, edit the file !slipdial.scripts.demon and search for the
  446. string ":dial1".
  447.  
  448. You will find the following
  449.  
  450. # dial number 1 from the configuration file
  451. :dial1
  452. set nRetries 50
  453. set phonenum %phonenum1
  454. if (?ne %phonenum1 %nopredialnum) set phonenum %predial%phonenum1
  455. goto dodial             
  456.  
  457.  
  458. If you want to alter the number of retries (i.e. how many times 
  459. SlipDial will attempt to dial a number and find it is engaged
  460. before giving up), change the line
  461.  
  462. set nRetries 50
  463.  
  464. For instance, suppose you want to retry 100 times.  Change this line
  465. to 
  466.  
  467. set nRetries 100
  468.  
  469. Note: there is a separate number of retries for each phone number in 
  470. the script, and also for the "List" list of numbers.  To change the
  471. number of retries for the List, search for ":List".
  472.  
  473. Note that in the case of the list, the number of retries defined will
  474. be the same for each number in the list.  So if you dial Sheffield, 
  475. Leeds, and London in the list, and set nRetries to 5 in the :List
  476. subroutine, SlipDial will
  477.  
  478. a) dial Sheffield 5 times maximum
  479. b) if Sheffield was engaged, dial Leeds 5 times maximum
  480. c) if Leeds was engaged, dial London 5 times maximum.
  481. d) give up in disgust
  482.  
  483. The default setup is that all menu items are tried up to 50 times,
  484. except for the list where each number is tried 5 times.  The idea
  485. behind this is that you would only use the List if you were trying to
  486. get through quickly.
  487.  
  488.  
  489. 4.6 To Change the Local Dialler Icon Number.
  490. --------------------------------------------
  491.  
  492. This version of the script allow your favourite number to be attached
  493. to an icon on the icon bar. This allows you to dial that number
  494. without having to use the menu item.  However to be useful you must
  495.  
  496. a) make sure you have the correct version of the file
  497. !SlipDial.scripts.DemonSpr
  498.  
  499. b) define your preferred number in the configuration file.
  500.  
  501. For a), you should be ok if you download the up-to-date version of the
  502. script file, as contained in the Acorn Starter-Pack.  If you have a
  503. demonspr file with only two sprites in it, you have got the wrong
  504. version - you can overcome this temporarily by creating a dummy sprite
  505. in the DemonSpr file called loc (short for local).
  506.  
  507. For b) you need to change the second from last line in the
  508. configuration file, !slipdial.scripts.demconfg, to your preferred
  509. number. Note that you don't have to include your mercury pin in front
  510. of the number if you are on mercury - this is automatically added for
  511. you.
  512.  
  513.  
  514. 5.0 Some Frequently Asked Questions
  515. ===================================
  516.  
  517. 1) When I log on, SlipDial appears to miss the "l" off "login" - is
  518. this a bug?
  519.  
  520. No - it is recommended by Demon that during login, diallers should
  521. wait for the strings  "ogin:", "otocol:" etc.  See the section "The
  522. Login Sequence" in the file 
  523.  
  524.          ftp.demon.co.uk:/pub/doc/Demon.txt
  525.          
  526. 2) When I start up SlipDial it exits immediately with an error.  What
  527. can I do?
  528.  
  529. Firstly, this is most likely to be due to the DemonSpr file.  You need
  530. the latest version of this which contains three sprites.  See below
  531. (how to get DemonSpr when !SlipDial isn't working).
  532.  
  533. However it might be some other problem. The best way of finding out is
  534. to enable the script log.  To do this, edit the script file, and
  535. search for the line
  536.  
  537. #trace "SlipDial:logoutput"
  538.  
  539. and change it to 
  540.  
  541. trace "SlipDial:logoutput"
  542.  
  543. i.e. delete the #.  This will cause SlipDial to write debugging
  544. information to the file !SlipDial.Scripts.logoutput
  545.  
  546. You can use the information obtained to try and find out what is going
  547. on.
  548.  
  549. 3) SlipDial starts up, dials, my modem gets through, but then the
  550. call finishes immediately?  
  551.  
  552. The SlipDial script is set up to watch the DCD (data carrier detect)
  553. line from your modem. If this line remains low, SlipDial will think
  554. the call has finished straight away.  You should check
  555.  
  556. a) your modem setup
  557. b) your cable
  558. c) your serial interface driver
  559.  
  560. Be especially careful to match lead and serial driver. The lead can be
  561. either Archimedes wiring or PC wiring - they are not compatible!  Also
  562. the BlockDriver must be set to match the interface port and the cable
  563. wiring.  The BlockDriver loaded by the SlipDial script is defined in
  564. the file !SlipDial.Scripts.demconfg, which is initialised the first
  565. time your run the script.  Here are some examples
  566.  
  567. You have a PC wired cable, with an internal port - first two lines of
  568. demconfg are
  569.  
  570. InternalPC
  571. 0
  572.  
  573. You have an Arc cable, with an internal port - should lead to 
  574.  
  575. Internal
  576. 0
  577.  
  578. You have a Serial port Dual interface card, you have connected the
  579. cable to port 1, you have a PC wired lead - should lead to 
  580.  
  581. SP_DualPC
  582. 1
  583.  
  584. 4) I've updated the script, and now it doesn't work because I haven't
  585. got the latest DemonSpr file - how can I log on if the script doesn't
  586. work?
  587.  
  588. Good question. The simplest answer is to use Paint to create an extra
  589. sprite in the DemonSpr file.  For instance, copy one of the existing
  590. sprites (such as hgon) and rename the copy to loc.  It might be a good
  591. idea to change its colour so that you don't mix it up with hgon.  Then
  592. log on to demon, and download the latest version of DemonSpr.
  593.  
  594. You can of course create your own sprite, representative of local
  595. traditions and/or landmarks.
  596.  
  597. 5) Last time I logged into Demon I changed my password, and now
  598. SlipDial doesn't work - what should I do?
  599.  
  600. You have to edit the file !SlipDial.scripts.demconfg.  The fifth line
  601. of this should be changed to your new password (which is case sensitive
  602. I believe).
  603.  
  604. 6) I've modified the script, and nothing seems to have changed.
  605.  
  606. You must make sure the new script has been loaded in.  Quit SlipDial
  607. and  load it again to ensure this.
  608.  
  609. 7) The script never calculates the newsrate - why? 
  610.  
  611. This feature has been removed, as the rate of new download is now 
  612. computed by TCPIP version 2.04.
  613.  
  614. 8) I've just upgraded to the latest version of the script and slipdial
  615. asked me to re-enter my configuration - why?
  616.  
  617. The latest version of the script stores more information in the config
  618. file - so to ensure the data is correct, it asks you to enter it all again.
  619.  
  620. 9) I want to know how fast a connection my modem has made; how can I do
  621.    this?
  622.    
  623. Once the script has loaded, click adjust on the slipdial 'telephone'
  624. icon: this will open the control window. When you dial the number, you
  625. will see a string in the control window with the speed and connection
  626. method (assuming you have messages set up correctly - see section 3.2
  627. above). With my USR Sportster, I get the message 
  628.  
  629. CONNECT 14400/ARQ/V32/V42BIS
  630.  
  631. or something like that! 
  632.  
  633.  
  634. 6.0 Conclusion and Acknowledgements.
  635. ====================================
  636.  
  637. I hope this helps if you want to modify the script.
  638.  
  639. I should like to acknowledge Robert Orwin for writing the original
  640. script, and of course thank Graham Allen for writing SlipDial in  the
  641. first place.  Also thanks to Mike James for improving the support for
  642. Mercury numbers. and introducing the Local icon, and to Doug Macready
  643. for improving the ease of configuration.
  644.  
  645. Alan Fitch
  646. alan@cycle.demon.co.uk
  647.  
  648. $Log:    ScriptHelp $
  649. # Revision 1.6  95/06/25  09:54:32  root
  650. # removed references to DSR/CTR checking to match demon v1.6
  651. # Revision 1.5  95/05/28  11:09:53  root
  652. # Added more detail on Mercury access, after testing by Mike James.
  653. # Revision 1.4  95/05/25  17:38:23  root
  654. # 1) modified to match demon script v1.5
  655. # Revision 1.3  95/05/08  01:25:28  root
  656. # To match v1.4 of script
  657. # Revision 1.2  95/05/08  01:13:42  root
  658. # updated to match version 1.3 of the 'demon' script
  659. # Revision 1.1  95/05/07  23:20:07  root
  660. # Initial revision
  661.