home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / PSION / COMMS / RCOM114 / SCR / _CIX.SCR < prev    next >
Encoding:
Text File  |  1994-10-13  |  1.7 KB  |  73 lines

  1. !
  2. ! Improved logon script for CIX and Dacom Quad modem
  3. !
  4.     INFO "Improved CIX Logon"
  5.     SETUP ( Baud=9600 :Stop=1 :Parity=none :Handshake=XonXoff,RtsCts
  6.             Fail=None :Timeout=20 :Echo=off :Data=8 )
  7.     ON send fail goto bad
  8.     SET c1=4
  9. rAlive:
  10.     SEND "AT"
  11.     WAIT 20 ( ON reply "OK<$d><$a>" GOTO alive )
  12.     ON c1 GOTO rAlive
  13.     GOTO merror
  14. alive:
  15.     SENDWAIT 10 "AT&F","OK<$d><$a>" GOTO merror
  16.     SENDWAIT 10 "AT\N0","OK<$d><$a>" GOTO merror
  17.     SENDWAIT 10 "AT&J2","OK<$d><$a>" GOTO merror
  18.     SET C1=3
  19.     GOTO reDial
  20. wait100:
  21.     INFO "Waiting to redial"
  22.     WAIT 60
  23. reDial:
  24.     SEND "ATD<CixNumber>"
  25.     WAIT 60 (
  26.     ON reply "CONNECT" GOTO letsgo
  27.     ON reply "NO DIALTONE" GOTO tele
  28.     ON reply "NO CARRIER" GOTO nocar
  29.     ON reply "ERROR" GOTO black
  30.     ON reply "BUSY" GOTO again )
  31.     GOTO merror
  32. again:
  33.     ON c1 GOTO wait100
  34.     ALERT "Line busy" : EXIT
  35. letsGo:
  36.     INFO "CONNECTED..."
  37.     SENDWAIT 60 "<$d>";,"login:" GOTO noLog
  38.     SENDWAIT 60 "qix<$d>";,"new user)" GOTO noUser
  39.     SENDWAIT 30 "<CixUserName>","Password:" GOTO noPass
  40.     SEND "<CixPassword>"
  41. tryAgain:
  42.     WAIT 40 (
  43.     ON REPLY "Main:" GOTO gotMain
  44.     ON REPLY "More" GOTO gotMore )
  45.     ALERT "SOMETHING STRANGE"
  46. gotMain:
  47.     EXIT
  48. gotMore:
  49.     WAIT 1
  50.     SEND "n"
  51.     GOTO tryAgain
  52.  
  53. black:
  54.     ALERT "Number dialled too many times" : EXIT
  55. nocar:
  56.     ALERT "No connection made" : EXIT
  57. tele:
  58.     ALERT "Check connected to telephone" : EXIT
  59. merror:
  60.     ALERT "Check modem connected" : EXIT
  61. bad:
  62.     ALERT "Check RS232 lead connected" : EXIT
  63. noLog:
  64.     ALERT "No Login received" : EXIT
  65. noUser:
  66.     ALERT "No user name" : EXIT
  67. noPass:
  68.     ALERT "No password" : EXIT
  69. noMain:
  70.     ALERT "No main"
  71.     EXIT
  72.  
  73.