home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / comms / Internet / zoc / INSTALL.FIL / SCRIPT / REGBMT.ZRX < prev    next >
Encoding:
Text File  |  1996-09-02  |  3.1 KB  |  115 lines

  1. /* REXX */
  2.  
  3. CR=d2c(13)
  4. CRCR=CR||CR
  5. PARSE VALUE ARG(1) WITH file
  6.  
  7. IF file="" THEN DO
  8.     msg= "This REXX program is only for use by the ZOC order form!"||CRCR
  9.     CALL ZocMsgBox msg
  10.     EXIT
  11. END
  12.  
  13. msg= "You are about to transfer your order form to BMT Micro via modem."||CR,
  14.     CR"This is a 3 step procedure which you may abort at any point."||CR,
  15.     CR"Do you want to continue?"
  16. result= ZocMsgBox(msg, 2)
  17. IF result=="##NO##" THEN SIGNAL aborted
  18.  
  19. msg= "Please make sure that ZOC is correctly configured for modem",
  20.     "communication."||CR,
  21.     CR"Do you want to continue?"
  22. result= ZocMsgBox(msg, 2)
  23. IF result=="##NO##" THEN SIGNAL aborted
  24.  
  25. msg= "In the next step, the order form will be shown.  Please check",
  26.     "if ordered products, credit card numbers, etc. are correct."CR,
  27.     CR"Do you want to continue?"
  28. result= ZocMsgBox(msg, 2)
  29. IF result=="##NO##" THEN SIGNAL aborted
  30.  
  31. ADDRESS CMD "E "file
  32.  
  33. msg= "The next step will show the phone number of the support BBS in",
  34.     "the USA."CR,
  35.     CR"Do you want to continue?"
  36. result= ZocMsgBox(msg, 2)
  37. if result=="##NO##" THEN SIGNAL aborted
  38.  
  39. phone= ZocAsk("Please complete the following phone number", "1 910 799 0923")
  40. IF phone="##CANCEL##" THEN SIGNAL aborted
  41.  
  42. msg= "ZOC will now try to CALL the support BBS and send your order form."CR,
  43.     CR"(You can watch the transfer by moving the order form window aside.)"CR,
  44.     CR"Do you want to continue?"
  45. result= ZocMsgBox(msg, 2)
  46. IF result=="##NO##" THEN SIGNAL aborted
  47.  
  48. CALL ZocTimeout 3
  49. CALL ZocSend "AT^M"
  50. CALL ZocWait "OK"
  51. CALL ZocDial phone
  52. CALL ZocTimeout 60
  53.  
  54. result= ZocWaitmux("CONNECT", "download purposes", "NO CARRIER", "NO DIALTONE", "BUSY", "ERROR")
  55. IF result=0 | result=1 THEN DO
  56.     CALL ZocTimeout 40
  57.  
  58.     result= ZocWait("and last name:")
  59.     IF result=640 THEN SIGNAL fail
  60.     
  61.     CALL ZocDelay 1
  62.     CALL ZocSend "ZOC^M" 
  63.  
  64.     result= ZocWait("your password:")
  65.     IF result=640 THEN SIGNAL fail
  66.  
  67.     CALL ZocDelay 1
  68.     CALL ZocSend "zocuser^M"
  69.  
  70.     /* Answer all "Press Any Key" prompts with Enter */
  71.     CALL ZocReply "Press Any Key", "^M"
  72.  
  73.     result= ZocWait("ZOC Orderform")
  74.     IF result=640 THEN SIGNAL fail
  75.  
  76.     CALL ZocSend "E"
  77.  
  78.     result= ZocWait("file name.ext:")
  79.     IF result=640 THEN SIGNAL fail
  80.     
  81.     newname= LEFT(RIGHT(DATE('D'),2,"X")||TIME('S'),8,"0")||".ORD"
  82.     CALL ZocSend newname
  83.     CALL ZocSend "^M"
  84.  
  85.     result= ZocUpload("ZModem", ".\"file)
  86.  
  87.     IF result="##OK##" THEN DO
  88.         CALL ZocWait "<D> Disconnect"
  89.         CALL ZocDelay 1
  90.         CALL ZocSend "D"
  91.         CALL ZocDelay 5
  92.         CALL ZocHangup
  93.         CALL ZocMsgBox "Your order was delivered successfully. Thank you!"
  94.     END
  95.     ELSE DO
  96.         CALL ZocMsgBox "Error while sending. The order was *NOT* sent!"
  97.     END
  98. END /* IF */
  99. ELSE DO
  100.     CALL ZocHangup
  101.     CALL ZocMsgBox "Sorry, connection failed. The order was *NOT* sent!"
  102. END /* ELSE */
  103. EXIT
  104.  
  105.  
  106. fail:
  107.     CALL ZocHangup
  108.     CALL ZocMsgBox "Sorry, connection failed. The order was *NOT* sent!"
  109.     EXIT
  110.  
  111. aborted:
  112.     CALL ZocMsgBox "User aborted. The order was *NOT* sent!"
  113.     EXIT
  114.  
  115.