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 >
Wrap
Text File
|
1998-09-05
|
4KB
|
139 lines
/* REXX */
CR=d2c(13)
CRCR=CR||CR
PARSE VALUE ARG(1) WITH file
IF file="" THEN DO
msg= "Dieses REXX-Programm kann nur von ZOC direkt",
"ausgefÅhrt werden."||CRCR
call ZocMsgBox msg
EXIT
END
msg= "Sie sind gerade dabei, Ihr Bestell-Formular",
"per Modem zu CompuLab zu senden."||CR,
CR"Dies geschieht in 3 Schritten. Dieser Vorgang",
"kann zu jedem Schritt abgebrochen werden."||CR,
CR"Wollen Sie fortfahren?"
result= ZocMsgBox(msg, 2)
IF result=="##NO##" THEN SIGNAL aborted
msg= "Bitte stellen Sie sicher, da· ZOC momentan fÅr",
"Modemverbindungen konfiguriert ist."CR,
CR"Wollen Sie fortfahren?"
result= ZocMsgBox(msg, 2)
IF result=="##NO##" THEN SIGNAL aborted
msg= "Im nÑchsten Schritt wird das Bestell-Formular",
"angezeigt. Bitte ÅberprÅfen Sie die bestellten",
"Posten, Kreditkartennummer usw."CR,
CR"Wollen Sie fortfahren?"
result= ZocMsgBox(msg, 2)
IF result=="##NO##" THEN SIGNAL aborted
PARSE VALUE ZocOS() with osysstr osversion
IF osysstr="OS2" then
ADDRESS CMD "E "file
else
ADDRESS CMD "NOTEPAD "file
msg= "Im nÑchsten Schritt wird die Telefonnummer der",
"Support-Mailbox in Deutschland angezeigt. Au·erhalb",
"Deutschlands mu· statt 0911 die internationale Vorwahl",
"0049 911 angegeben werden. "CR,
CR"Wollen Sie fortfahren?"
result= ZocMsgBox(msg, 2)
IF result=="##NO##" THEN SIGNAL aborted
phone= ZocAsk("Bitte ergÑnzen Sie die Telefonnummer", "0911 3781200")
IF phone="##CANCEL##" THEN SIGNAL aborted
msg= "ZOC versucht nun, die Support-Mailbox anzurufen",
"und das Bestell-Formular zu senden. (Sie kînnen die öbertragung",
"beobachten, wenn Sie das Bestell-Fenster zur Seite schieben.)"CR,
CR"Wollen Sie fortfahren?"
result= ZocMsgBox(msg, 2)
IF result=="##NO##" THEN SIGNAL aborted
CALL ZocTimeout 3
CALL ZocSend "AT^M"
CALL ZocWait "OK"
CALL ZocConnect phone
CALL ZocTimeout 60
result= ZocWaitmux("CONNECT", "(MSN)", "NO CARRIER", "NO DIALTONE", "BUSY", "ERROR")
IF result=0 | result=1 THEN do
CALL ZocTimeout 40
result= ZocWait("Name")
IF result=640 THEN SIGNAL fail
CALL ZocDelay 1
CALL ZocSend "ZOC^M"
result= ZocWait("Ihre Wahl")
IF result=640 THEN SIGNAL fail
CALL ZocDelay 1
CALL ZocSend "Y^M"
result= ZocWait("Bitte Text eingeben")
IF result=640 THEN SIGNAL fail
CALL ZocDelay 1
CALL ZocSend "THIS REGISTRATION WAS DELIVERED BY REGCOMPU.ZRX^M^M"
stuffseen= 0
linecnt= 0
DO FOREVER
line= linein(file) /* read line from file */
line= strip(line,'l',D2C(9)) /* remove leading TAB characters */
line= strip(line,'l') /* remove leading space characters */
linecnt= linecnt+1
IF STREAM(file, 's')\="READY" THEN /* EOF */
LEAVE
IF stuffseen=0 & line="" THEN
ITERATE
ELSE
stuffseen= 1
CALL ZocSend " "||line
CALL ZocSend "^M"
END /* DO */
CALL ZocSend ".^M"
CALL ZocTimeout 20
result= ZocWait("Eingabe beendet.")
IF result=0 & linecnt>10 THEN DO
CALL ZocWait "Ihre Wahl"
CALL ZocDelay 1
CALL ZocSend "Z^M"
CALL ZocDelay 5
CALL ZocDisconnect
CALL ZocMsgBox "Bestellung wurde erfolgreich versendet. Vielen Dank!"
END
ELSE DO
CALL ZocMsgBox "Sendefehler. Die Bestellung wurde *NICHT* versendet!"
END
END /* IF */
ELSE DO
CALL ZocDisconnect
CALL ZocMsgBox "Keine Verbindung. Die Bestellung wurde *NICHT* versendet!"
END /* ELSE */
EXIT
fail:
CALL ZocDisconnect
CALL ZocMsgBox "Keine Verbindung. Die Bestellung wurde *NICHT* versendet!"
EXIT
aborted:
CALL ZocMsgBox "Abbruch. Die Bestellung wurde *NICHT* versendet!"
EXIT