home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / comms / read45a / SCRIPTS.ZIP / READALL.SCR < prev    next >
Text File  |  1995-04-24  |  23KB  |  956 lines

  1. NEXISTS "m:\cix\file.swt" GOTO nofile
  2. MENU "Choose File Option" (
  3.      "Download File" GOTO dftag
  4.      "Upload File" GOTO uftag
  5.      "Download Binmail" GOTO dmtag
  6.      "Upload Binmail" GOTO umtag
  7.      "No File Action" GOTO nofile)
  8. nofile:
  9.   INFO "CIX Logon"
  10.      SETUP (
  11.      Stop=1 :
  12.      Parity=none :
  13.      Fail=None :
  14.      Timeout=20 :
  15.      Echo=off :
  16.      Data=8 )
  17.     EXISTS "m:\cix\rhsc_opt.001" GOTO T001
  18.     EXISTS "m:\cix\rhsc_opt.002" GOTO T002
  19.     EXISTS "m:\cix\rhsc_opt.003" GOTO T003
  20.     GOTO misrate
  21. T001::
  22.     SETUP (BAUD=2400)
  23.     INFO "Baud Rate set to 2400"
  24.     WAIT 3
  25.     GOTO misrate
  26. T002::
  27.     SETUP (BAUD=9600)
  28.     INFO "Baud Rate set to 9600"
  29.     WAIT 3
  30.     GOTO misrate
  31. T003::
  32.     SETUP (BAUD=19200)
  33.     INFO "Baud Rate set to 19200"
  34.     WAIT 3
  35. misrate::
  36.     EXISTS "m:\cix\rhsc_opt.004" GOTO T004
  37.     EXISTS "m:\cix\rhsc_opt.005" GOTO T005
  38.     EXISTS "m:\cix\rhsc_opt.006" GOTO T006
  39.     GOTO misshake
  40. T004::
  41.     SETUP (HANDSHAKE=rtscts,xonxoff)
  42.     INFO "Handshaking set to Both"
  43.     GOTO misshake
  44. T005::
  45.     SETUP (HANDSHAKE=rtscts)
  46.     INFO "Handshaking set to RTSCTS"
  47.     GOTO misshake
  48. T006::
  49.     SETUP (HANDSHAKE=xonxoff)
  50.     INFO "Handshaking set to XonXoff"
  51. misshake::
  52.     ON send fail goto bad
  53.     SET c1=4
  54. rAlive:
  55.         SEND "<initialise>"
  56.     WAIT 20 ( ON reply "OK<$d><$a>" GOTO alive )
  57.     ON c1 GOTO rAlive
  58.     GOTO merror
  59. alive:
  60.     SET C1=9
  61.     GOTO reDial   
  62. wait100:
  63.     INFO "Waiting to redial"
  64.     WAIT 10
  65. reDial:
  66.     SEND "<prefix><CixNumber>"
  67.     WAIT 120 (
  68.     ON reply "CONNECT" GOTO letsgo
  69.     ON reply "NO DIALTONE" GOTO tele
  70.     ON reply "NO CARRIER" GOTO nocar
  71.     ON reply "ERROR" GOTO black
  72.     ON reply "BUSY" GOTO again )
  73.     GOTO merror
  74. again:
  75.     ON c1 GOTO wait100
  76.     ALERT "Line busy" : EXIT
  77. letsGo:
  78.     INFO "CONNECTED..."
  79.     SENDWAIT 160 "<$d>";,"login:" GOTO noLog
  80.     SENDWAIT 160 "qix<$d>";,"new user)" GOTO noUser
  81.     SENDWAIT 130 "<CixUserName>","Password:" GOTO noPass
  82.     SEND "<CixPassword>"
  83. tryAgain:
  84.     WAIT 100 (
  85.     ON REPLY "Main:" GOTO gotMain
  86.     ON REPLY "More" GOTO gotMore )
  87.     ALERT "SOMETHING STRANGE"
  88. gotMain:
  89.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y01
  90.     SEND "OPTION DOWNLOAD C Q"
  91.     GOTO misy01
  92. y01::
  93.     SEND "OPTION DOWNLOAD Y Q"
  94. misy01::
  95.         SEND "OPTION UPLOAD C Q"
  96.         SEND "OPTION SCRATCHNAME cix.txt QUIT"
  97.         SEND "OPTION REFERENCE YES QUIT"
  98.     SEND "Q"
  99.     NEXISTS "loc::m:\cix\reply.txt" GOTO noup
  100.         INFO "Starting Upload"
  101.         WAIT 5
  102.         SEND "UPLOAD"
  103.         WAIT 10
  104.         TRANSMIT "loc::m:\cix\reply.txt","XM1K"
  105.         WAIT 5
  106.         SEND "SCPUT SCRIPT"
  107.         WAIT 5
  108.         INFO "Running Script"
  109.         SEND "SCRIPT"
  110. noup:
  111.         WAIT 5
  112.         INFO "Getting Mail"
  113.         SEND "MAIL"
  114.         WAIT 50 (ON REPLY "Mail:" goto mcont)
  115. mcont:
  116.         SEND "File All"
  117. retry1:
  118.         WAIT 100 (ON REPLY "Mail:" GOTO read
  119.                   ON REPLY "ail:" GOTO read)
  120.         GOTO retry1
  121. read:
  122.         SEND "q"
  123.         WAIT 50 (ON REPLY "Main:" GOTO file)
  124. file:
  125.         SEND "File read all"
  126. retry2:
  127.         WAIT 100 (ON REPLY "Main:" GOTO cont
  128.                   ON REPLY "ain:" GOTO cont)
  129.         GOTO retry2
  130. cont:
  131.         INFO "Starting Download"
  132.         SEND "Down"
  133.         WAIT 5
  134.     EXISTS "m:\cix\rhsc_opt.007" GOTO T007
  135.     EXISTS "m:\cix\rhsc_opt.008" GOTO T008
  136.     EXISTS "m:\cix\rhsc_opt.009" GOTO T009
  137. T007::
  138.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y02
  139.         RECEIVE "a:\cix\cix.txt","XM1K"
  140.         GOTO missdown
  141. y02:: 
  142.         RECEIVE "a:\cix\cix.txt","YM1K"
  143.         GOTO missdown
  144. T008::
  145.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y03
  146.         RECEIVE "m:\cix\cix.txt","XM1K"
  147.         GOTO missdown
  148. y03:: 
  149.         RECEIVE "m:\cix\cix.txt","YM1K"
  150.         GOTO missdown 
  151. T009::
  152.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y04
  153.         RECEIVE "b:\cix\cix.txt","XM1K"
  154.         GOTO missdown
  155. y04:: 
  156.         RECEIVE "b:\cix\cix.txt","YM1K"
  157. missdown::
  158.         WAIT 50 (ON REPLY "Main:" GOTO swoff
  159.                  ON REPLY "y/n"   GOTO yorn)
  160.         INFO "Problem! Disconecting"
  161. swoff:
  162.         INFO "Sending LOGOFF"
  163.         SENDWAIT 20 "BYE","y/n" GOTO cont1
  164.         SEND "Y"
  165. cont1:
  166.         INFO "Hanging UP!!"
  167.         HANGUP
  168.     INFO "Finished"
  169.     EXIT
  170. gotMore:
  171.     WAIT 1
  172.     SEND "n"
  173.     GOTO tryAgain
  174. yorn:
  175.         SEND "Y<$d>"
  176.         GOTO swoff
  177.  
  178. dftag:
  179.     QUERY "File Download" (
  180.     "Conference:",s2
  181.         "Topic:",s3
  182.         "File to Download:",s4
  183.         "To (Path and Name):",s5)
  184.     INFO "CIX Logon"
  185.      SETUP (
  186.      Stop=1 :
  187.      Parity=none :
  188.      Fail=None :
  189.      Timeout=20 :
  190.      Echo=off :
  191.      Data=8 )
  192.     EXISTS "m:\cix\rhsc_opt.001" GOTO T1001
  193.     EXISTS "m:\cix\rhsc_opt.002" GOTO T1002
  194.     EXISTS "m:\cix\rhsc_opt.003" GOTO T1003
  195.     GOTO misrate1
  196. T1001::
  197.     SETUP (BAUD=2400)
  198.     INFO "Baud Rate set to 2400"
  199.     WAIT 3
  200.     GOTO misrate1
  201. T1002::
  202.     SETUP (BAUD=9600)
  203.     INFO "Baud Rate set to 9600"
  204.     WAIT 3
  205.     GOTO misrate1
  206. T1003::
  207.     SETUP (BAUD=19200)
  208.     INFO "Baud Rate set to 19200"
  209.     WAIT 3
  210. misrate1::
  211.     EXISTS "m:\cix\rhsc_opt.004" GOTO T1004
  212.     EXISTS "m:\cix\rhsc_opt.005" GOTO T1005
  213.     EXISTS "m:\cix\rhsc_opt.006" GOTO T1006
  214.     GOTO misshake1
  215. T1004::
  216.     SETUP (HANDSHAKE=rtscts,xonxoff)
  217.     INFO "Handshaking set to Both"
  218.     GOTO misshake1
  219. T1005::
  220.     SETUP (HANDSHAKE=rtscts)
  221.     INFO "Handshaking set to RTSCTS"
  222.     GOTO misshake1
  223. T1006::
  224.     SETUP (HANDSHAKE=xonxoff)
  225.     INFO "Handshaking set to XonXoff"
  226. misshake1::
  227.     ON send fail goto bad
  228.     SET c1=4
  229. dfrAlive:
  230.         SEND "<initialise>"
  231.     WAIT 20 ( ON reply "OK<$d><$a>" GOTO dfalive )
  232.     ON c1 GOTO dfrAlive
  233.     GOTO merror
  234. dfalive:
  235.     SET C1=9
  236.     GOTO dfreDial   
  237. dfwait100:
  238.     INFO "Waiting to redial"
  239.     WAIT 10
  240. dfreDial:
  241.     SEND "<prefix><CixNumber>"
  242.     WAIT 120 (
  243.     ON reply "CONNECT" GOTO dfletsgo
  244.     ON reply "NO DIALTONE" GOTO tele
  245.     ON reply "NO CARRIER" GOTO nocar
  246.     ON reply "ERROR" GOTO black
  247.     ON reply "BUSY" GOTO dfagain )
  248.     GOTO merror
  249. dfagain:
  250.     ON c1 GOTO dfwait100
  251.     ALERT "Line busy" : EXIT
  252. dfletsGo:
  253.     INFO "CONNECTED..."
  254.     SENDWAIT 160 "<$d>";,"login:" GOTO noLog
  255.     SENDWAIT 160 "qix<$d>";,"new user)" GOTO noUser
  256.     SENDWAIT 130 "<CixUserName>","Password:" GOTO noPass
  257.     SEND "<CixPassword>"
  258. dftryAgain:
  259.     WAIT 100 (
  260.     ON REPLY "Main:" GOTO dfgotMain
  261.     ON REPLY "More" GOTO dfgotMore )
  262.     ALERT "SOMETHING STRANGE"
  263. dfgotMain:
  264.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y20
  265.     SEND "OPTION DOWNLOAD C Q"
  266.     GOTO misy20
  267. y20::
  268.     SEND "OPTION DOWNLOAD Y Q"
  269. misy20::
  270.     SEND "OPTION UPLOAD C Q"
  271.         SEND "OPTION SCRATCHNAME cix.txt QUIT"
  272.         SEND "OPTION REFERENCE YES QUIT"
  273.         SEND "Q"
  274.     NEXISTS "loc::m:\cix\reply.txt" GOTO noup1
  275.         INFO "Starting Upload"
  276.         SEND "UPLOAD"
  277.         WAIT 5
  278.         TRANSMIT "loc::m:\cix\reply.txt","XM1K"
  279.         SEND "SCPUT SCRIPT"
  280.         WAIT 5
  281.         INFO "Running Script"
  282.         SEND "SCRIPT"
  283. noup1:
  284.     WAIT 5
  285.         INFO "Getting Mail"
  286.         SEND "MAIL"
  287.         WAIT 50 (ON REPLY "Mail:" goto dfmcont)
  288. dfmcont:
  289.         SEND "File All"
  290. dfretry1:
  291.         WAIT 100 (ON REPLY "Mail:" GOTO dfread
  292.                   ON REPLY "ail:" GOTO dfread)
  293.         GOTO dfretry1
  294. dfread:
  295.         SEND "q"
  296.         WAIT 50 (ON REPLY "Main:" GOTO dffile)
  297. dffile:
  298.         SEND "File read all"
  299. dfretry2:
  300.         WAIT 100 (ON REPLY "Main:" GOTO dfcont
  301.                   ON REPLY "ain:" GOTO dfcont)
  302.         GOTO dfretry2
  303. dfcont:
  304.         INFO "Starting Download"
  305.         SEND "Down"
  306.         WAIT 5
  307.     EXISTS "m:\cix\rhsc_opt.007" GOTO T1007
  308.     EXISTS "m:\cix\rhsc_opt.008" GOTO T1008
  309.     EXISTS "m:\cix\rhsc_opt.009" GOTO T1009
  310. T1007::
  311.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y05
  312.         RECEIVE "a:\cix\cix.txt","XM1K"
  313.         GOTO missdown1
  314. y05:: 
  315.         RECEIVE "a:\cix\cix.txt","YM1K"
  316.         GOTO missdown1 
  317. T1008::
  318.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y06
  319.         RECEIVE "m:\cix\cix.txt","XM1K"
  320.         GOTO missdown1
  321. y06:: 
  322.         RECEIVE "m:\cix\cix.txt","YM1K"
  323.         GOTO missdown1 
  324. T1009::
  325.     EXISTS "m:\cix\rhsc_opt.010" GOTO Y07
  326.         RECEIVE "b:\cix\cix.txt","XM1K"
  327.         GOTO missdown1
  328. y07:: 
  329.         RECEIVE "b:\cix\cix.txt","YM1K"
  330. missdown1::
  331.         WAIT 50 (ON REPLY "Main:" GOTO dfswoff
  332.                  ON REPLY "y/n"   GOTO dfyorn)
  333.         INFO "Problem! Disconecting"
  334.         GOTO dfnofile2
  335. dfswoff:
  336.     SEND "OPTION DOWNLOAD C Q"
  337.         NEXISTS "m:\cix\file.swt" GOTO dfnofile2
  338.         S