home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 8 / boot-disc-1997-04.iso / PDA_Soft / Psion / comms / rcom114 / SCR / _MCI.SCR < prev    next >
Text File  |  1994-10-12  |  2KB  |  69 lines

  1. !
  2. ! Improved logon script for MCI mail and Dacom Quad modem
  3. !
  4.     INFO "Improved MCI Logon"
  5.     SETUP ( Baud=9600 :Stop=1 :Parity=even :Handshake=XonXoff,RtsCts
  6.             Fail=None :Timeout=20 :Echo=off :Data=7 )
  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<PssNumber>"
  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.     WAIT 4 : SEND "<$d>";
  38.     WAIT 4 : SEND "<$d>";
  39.     WAIT 4 : SEND "d1<$d>";
  40.     WAIT 4
  41.     SENDWAIT 60 "<$d>";,"NUI?<$d><$a>" GOTO noNui
  42.     SEND "<MciNumber>"
  43.     SETUP (Data=8 :Parity=none)
  44.     WAIT 60 ( ON REPLY "user name:" GOTO gotUser) : goto noUser
  45. gotUser:
  46.     SENDWAIT 30 "<MciUserName>","Password:" GOTO noPass
  47.     SENDWAIT 90 "<MciPassword>","Command:" GOTO noCom
  48.     EXIT
  49.  
  50. black:
  51.     ALERT "Number dialled too many times" : EXIT
  52. nocar:
  53.     ALERT "No connection made" : EXIT
  54. tele:
  55.     ALERT "Check connected to telephone" : EXIT
  56. merror:
  57.     ALERT "Check modem connected" : EXIT
  58. bad:
  59.     ALERT "Check RS232 lead connected" : EXIT
  60. noNui:
  61.     ALERT "No NUI? received" : EXIT
  62. noUser:
  63.     ALERT "No user name" : EXIT
  64. noPass:
  65.     ALERT "No password" : EXIT
  66. noCom:
  67.     ALERT "No command"
  68.     EXIT
  69.