home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / comms / read45a / SCRIPTS.ZIP / BASKETS.SCR next >
Text File  |  1995-03-12  |  4KB  |  165 lines

  1.   INFO "CIX Logon"
  2.      SETUP (
  3.      Stop=1 :
  4.      Parity=none :
  5.      Fail=None :
  6.      Timeout=20 :
  7.      Echo=off :
  8.      Data=8 )
  9.     EXISTS "m:\cix\rhsc_opt.001" GOTO T001
  10.     EXISTS "m:\cix\rhsc_opt.002" GOTO T002
  11.     EXISTS "m:\cix\rhsc_opt.003" GOTO T003
  12.     GOTO misrate
  13. T001::
  14.     SETUP (BAUD=2400)
  15.     INFO "Baud Rate set to 2400"
  16.     WAIT 3
  17.     GOTO misrate
  18. T002::
  19.     SETUP (BAUD=9600)
  20.     INFO "Baud Rate set to 9600"
  21.     WAIT 3
  22.     GOTO misrate
  23. T003::
  24.     SETUP (BAUD=19200)
  25.     INFO "Baud Rate set to 19200"
  26.     WAIT 3
  27. misrate::
  28.     EXISTS "m:\cix\rhsc_opt.004" GOTO T004
  29.     EXISTS "m:\cix\rhsc_opt.005" GOTO T005
  30.     EXISTS "m:\cix\rhsc_opt.006" GOTO T006
  31.     GOTO misshake
  32. T004::
  33.     SETUP (HANDSHAKE=rtscts,xonxoff)
  34.     INFO "Handshaking set to Both"
  35.     GOTO misshake
  36. T005::
  37.     SETUP (HANDSHAKE=rtscts)
  38.     INFO "Handshaking set to RTSCTS"
  39.     GOTO misshake
  40. T006::
  41.     SETUP (HANDSHAKE=xonxoff)
  42.     INFO "Handshaking set to XonXoff"
  43. misshake::
  44.     ON send fail goto bad
  45.     SET c1=4
  46. rAlive:
  47.         SEND "<initialise>"
  48.     WAIT 20 ( ON reply "OK<$d><$a>" GOTO alive )
  49.     ON c1 GOTO rAlive
  50.     GOTO merror
  51. alive:
  52.     SET C1=9
  53.     GOTO reDial   
  54. wait100:
  55.     INFO "Waiting to redial"
  56.     WAIT 10
  57. reDial:
  58.     SEND "<prefix><CixNumber>"
  59.     WAIT 120 (
  60.     ON reply "CONNECT" GOTO letsgo
  61.     ON reply "NO DIALTONE" GOTO tele
  62.     ON reply "NO CARRIER" GOTO nocar
  63.     ON reply "ERROR" GOTO black
  64.     ON reply "BUSY" GOTO again )
  65.     GOTO merror
  66. again:
  67.     ON c1 GOTO wait100
  68.     ALERT "Line busy" : EXIT
  69. letsGo:
  70.     INFO "CONNECTED..."
  71.     SENDWAIT 160 "<$d>";,"login:" GOTO noLog
  72.     SENDWAIT 160 "qix<$d>";,"new user)" GOTO noUser
  73.     SENDWAIT 130 "<CixUserName>","Password:" GOTO noPass
  74.     SEND "<CixPassword>"
  75. tryAgain:
  76.     WAIT 100 (
  77.       ON REPLY "Main:" GOTO gotMain
  78.       ON REPLY "More" GOTO gotMore )
  79.     ALERT "SOMETHING STRANGE"
  80. gotMain:
  81.     SEND "OPTION DOWNLOAD C Q"
  82.       SEND "MAIL"
  83.       WAIT 50 (ON REPLY "Mail:" goto mcont)
  84. mcont:
  85.         SEND "File OUTbasket"
  86.         WAIT 100 (ON REPLY "Mail:" GOTO read 
  87.                   ON REPLY "ail:" GOTO read 
  88.                   ON REPLY "Scratchpad is 0 bytes." GOTO swoff
  89.                  )
  90. read:
  91.         SEND "q"
  92.         WAIT 50 (ON REPLY "Main:" GOTO file
  93.                  ON REPLY "Read:" GOTO file
  94.                  ON REPLY "ead:" GOTO file
  95.                 )
  96. file:
  97.         INFO "Starting Download"
  98.         SEND "Down"
  99.         WAIT 5
  100.     RECEIVE "\cix\misc\Outbask.bas","XM1K"
  101.         WAIT 100 (ON REPLY "Main:" GOTO swoff
  102.                   ON REPLY "y/n"   GOTO yorn)
  103.         INFO "Problem! Disconecting"
  104. swoff:
  105. SEND "MAIL"
  106.       WAIT 50 (ON REPLY "Mail:" goto mcont1)
  107. mcont1:
  108.         SEND "File INbasket"
  109.         WAIT 100 (ON REPLY "Mail:" GOTO read1
  110.                   ON REPLY "ail:" GOTO read1 
  111.                   ON REPLY "Scratchpad is 0 bytes." GOTO swoff1
  112.                  )
  113. read1:
  114.         SEND "q"
  115.         WAIT 50 (ON REPLY "Main:" GOTO file1
  116.                  ON REPLY "Read:" GOTO file1
  117.                  ON REPLY "ead:" GOTO file1
  118.                 )
  119. file1:
  120.         INFO "Starting Download"
  121.         SEND "Down"
  122.         WAIT 5
  123.         RECEIVE "\cix\misc\Inbask.bas","XM1K"
  124.         WAIT 100 (ON REPLY "Main:" GOTO swoff1
  125.                   ON REPLY "y/n"   GOTO yorn1)
  126.         INFO "Problem! Disconecting"
  127. swoff1:
  128.         INFO "Sending LOGOFF"
  129.         SENDWAIT 20 "BYE","y/n" GOTO cont1
  130.         SEND "Y"
  131. cont1:
  132.         INFO "Hanging UP!!"
  133.         HANGUP
  134.     INFO "Finished"
  135.     EXIT
  136. gotMore:
  137.     WAIT 1
  138.     SEND "n"
  139.     GOTO tryAgain
  140. yorn:
  141.         SEND "Y"
  142.         GOTO swoff
  143. yorn1:
  144.         SEND "Y"
  145.         GOTO swoff1
  146. black:
  147.     ALERT "Number dialled too many times" : EXIT
  148. nocar:
  149.     ALERT "No connection made" : EXIT
  150. tele:
  151.     ALERT "Check connected to telephone" : EXIT
  152. merror:
  153.     ALERT "Check modem connected" : EXIT
  154. bad:
  155.     ALERT "Check RS232 lead connected" : EXIT
  156. noLog:
  157.     ALERT "No Login received" : EXIT
  158. noUser:
  159.     ALERT "No user name" : EXIT
  160. noPass:
  161.     ALERT "No password" : EXIT
  162. noMain:
  163.     ALERT "No main"
  164.     EXIT
  165.