home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / mac / software / kommunik / misc / zoc400wg.exe / setup.fil / script / REGCOMPU.ZRX < prev    next >
Text File  |  1998-09-05  |  4KB  |  139 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= "Dieses REXX-Programm kann nur von ZOC direkt",
  9.         "ausgefÅhrt werden."||CRCR
  10.     call ZocMsgBox msg
  11.     EXIT
  12. END
  13.  
  14. msg= "Sie sind gerade dabei, Ihr Bestell-Formular",
  15.     "per Modem zu CompuLab zu senden."||CR,
  16.     CR"Dies geschieht in 3 Schritten. Dieser Vorgang",
  17.     "kann zu jedem Schritt abgebrochen werden."||CR,
  18.     CR"Wollen Sie fortfahren?"
  19. result= ZocMsgBox(msg, 2)
  20. IF result=="##NO##" THEN SIGNAL aborted
  21.  
  22. msg= "Bitte stellen Sie sicher, da· ZOC momentan fÅr",
  23.     "Modemverbindungen konfiguriert ist."CR,
  24.     CR"Wollen Sie fortfahren?"
  25. result= ZocMsgBox(msg, 2)
  26. IF result=="##NO##" THEN SIGNAL aborted
  27.  
  28. msg= "Im nÑchsten Schritt wird das Bestell-Formular",
  29.     "angezeigt. Bitte ÅberprÅfen Sie die bestellten",
  30.     "Posten, Kreditkartennummer usw."CR,
  31.     CR"Wollen Sie fortfahren?"
  32. result= ZocMsgBox(msg, 2)
  33. IF result=="##NO##" THEN SIGNAL aborted
  34.  
  35. PARSE VALUE ZocOS() with osysstr osversion
  36. IF osysstr="OS2" then 
  37.     ADDRESS CMD "E "file
  38. else
  39.     ADDRESS CMD "NOTEPAD "file
  40.  
  41. msg= "Im nÑchsten Schritt wird die Telefonnummer der",
  42.     "Support-Mailbox in Deutschland angezeigt. Au·erhalb",
  43.     "Deutschlands mu· statt 0911 die internationale Vorwahl",
  44.     "0049 911 angegeben werden. "CR,
  45.     CR"Wollen Sie fortfahren?"
  46. result= ZocMsgBox(msg, 2)
  47. IF result=="##NO##" THEN SIGNAL aborted
  48.  
  49. phone= ZocAsk("Bitte ergÑnzen Sie die Telefonnummer", "0911 3781200")
  50. IF phone="##CANCEL##" THEN SIGNAL aborted
  51.  
  52. msg= "ZOC versucht nun, die Support-Mailbox anzurufen",
  53.     "und das Bestell-Formular zu senden. (Sie kînnen die öbertragung",
  54.     "beobachten, wenn Sie das Bestell-Fenster zur Seite schieben.)"CR,
  55.     CR"Wollen Sie fortfahren?"
  56. result= ZocMsgBox(msg, 2)
  57. IF result=="##NO##" THEN SIGNAL aborted
  58.  
  59. CALL ZocTimeout 3
  60. CALL ZocSend "AT^M"
  61. CALL ZocWait "OK"
  62. CALL ZocConnect phone
  63. CALL ZocTimeout 60
  64.  
  65. result= ZocWaitmux("CONNECT", "(MSN)", "NO CARRIER", "NO DIALTONE", "BUSY", "ERROR")
  66.  
  67. IF result=0 | result=1 THEN do
  68.     CALL ZocTimeout 40
  69.     
  70.     result= ZocWait("Name")
  71.     IF result=640 THEN SIGNAL fail
  72.     
  73.     CALL ZocDelay 1
  74.     CALL ZocSend "ZOC^M"
  75.     
  76.     result= ZocWait("Ihre Wahl")
  77.     IF result=640 THEN SIGNAL fail
  78.     
  79.     CALL ZocDelay 1
  80.     CALL ZocSend "Y^M"
  81.     
  82.     result= ZocWait("Bitte Text eingeben")
  83.     IF result=640 THEN SIGNAL fail
  84.     
  85.     CALL ZocDelay 1
  86.     CALL ZocSend "THIS REGISTRATION WAS DELIVERED BY REGCOMPU.ZRX^M^M"
  87.     
  88.     stuffseen= 0
  89.     linecnt= 0
  90.     DO FOREVER 
  91.         line= linein(file)                /* read line from file */
  92.         line= strip(line,'l',D2C(9))    /* remove leading TAB characters */
  93.         line= strip(line,'l')            /* remove leading space characters */
  94.         linecnt= linecnt+1
  95.         IF STREAM(file, 's')\="READY" THEN /* EOF */
  96.             LEAVE
  97.  
  98.         IF stuffseen=0 & line="" THEN 
  99.             ITERATE
  100.         ELSE
  101.             stuffseen= 1
  102.  
  103.         CALL ZocSend "    "||line
  104.         CALL ZocSend "^M"
  105.     END /* DO */
  106.     CALL ZocSend ".^M"
  107.     
  108.     CALL ZocTimeout 20
  109.     result= ZocWait("Eingabe beendet.")
  110.     IF result=0 & linecnt>10 THEN DO
  111.         CALL ZocWait "Ihre Wahl"
  112.         CALL ZocDelay 1
  113.         CALL ZocSend "Z^M"
  114.         CALL ZocDelay 5
  115.         CALL ZocDisconnect
  116.         CALL ZocMsgBox "Bestellung wurde erfolgreich versendet. Vielen Dank!"
  117.     END
  118.     ELSE DO
  119.         CALL ZocMsgBox "Sendefehler. Die Bestellung wurde *NICHT* versendet!"
  120.     END
  121. END /* IF */
  122. ELSE DO
  123.     CALL ZocDisconnect
  124.     CALL ZocMsgBox "Keine Verbindung. Die Bestellung wurde *NICHT* versendet!"
  125. END /* ELSE */
  126.  
  127. EXIT
  128.  
  129.  
  130. fail:
  131.     CALL ZocDisconnect
  132.     CALL ZocMsgBox "Keine Verbindung. Die Bestellung wurde *NICHT* versendet!"
  133.     EXIT
  134.  
  135. aborted:
  136.     CALL ZocMsgBox "Abbruch. Die Bestellung wurde *NICHT* versendet!"
  137.     EXIT
  138.  
  139.