home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
On Hand
/
On_Hand_From_Softbank_1994_Release_2_Disc_1_1994.iso
/
00091
/
s
/
register.sc_
/
WRLYREG1.SCR
< prev
next >
Wrap
Text File
|
1993-09-03
|
5KB
|
102 lines
* WRLYREG1.SCR - Relay/PC Gold for Windows Online Registration Script
* (c) Copyright 1993 Relay Technology Inc.
*
* FUNCTION: This script will build the registration file and send it to the
* registration PC. It is implied that DDE communications will set
* the variable ®NUM to the telephone number to dial and &DATAREC1-6
* will contain a string of tokens to build the registration file.
* This script works exclusively with Relay/PC Gold for Windows.
on error
set attend off
global &PASSWORD;&PASSWORD = "CHECK6"
global &CONT; &CONT = N
&COMFILE = "RELAY.BIN"
* Make sure script directory has trailing backslash
if (&substr(&SCRDIR,&len(&SCRDIR),1) <> "\")
then &SCRDIR = &SCRDIR.\
* Build file <serial#>.REG
gosub FINISH
&HRC = &rc
if (&HRC <> 0) then &MSG1 = "Not able to build registration file."
then quiet stop
&CALLNAME = "REG_PC" ;* try COM1 connection file 1st
-OK3
quiet call "&CALLNAME" nodisplay
&HRC = &rc
wait 1
if (&HRC=3) or (&HRC=5) or (&HRC=6) or (&HRC=9) or (&HRC=15) or (&HRC=16) or (&HRC=17) then goto NEXTPORT
* Assign message and stop script
else gosub DOMSG
else quiet stop
-NEXTPORT
* If we already tried COM2, then stop script
if (&CALLNAME="REG2_PC") then gosub DOMSG
then quiet stop
* Otherwise, try COM2
&CALLNAME="REG2_PC"
goto OK3
-FINISH
gosub GETZAP
open &SCRDIR.&rserial..REG as #1 for output
&HRC = &rc
if (&HRC <> 0) then return 1
* Write NAME through ZIP for 1st page
write file #1 "Relay/PC Gold for Windows &ZAPLVL Registration &rserial &date"
write file #1 &DATAREC1
write file #1 "&DATAREC2"
write file #1 "&DATAREC3"
write file #1 "&DATAREC4"
write file #1 "&DATAREC5"
write file #1 "&DATAREC6"
if (&DATAREC7 <> "") write file #1 "&DATAREC7"
if (&DATAREC8 <> "") write file #1 "&DATAREC8"
if (&DATAREC9 <> "") write file #1 "&DATAREC9"
close #1
&HRC = &rc
if (&HRC <> 0) then return 1
return
*
* Open RELAY.BIN and grab the current ZAP Level. Save it to a variable.
*
-GETZAP open &RDRIVE\&COMFILE as #1 length 1
point #1 145 ;* Point to the ZAP level
read file #1 &REC length 1 ;* Read the current ZAP level
&ZAPLVL = &decimal(&ascii(&REC)) ;* Convert ZAP level to ascii
if (&length(&ZAPLVL)=1) ;* If needed, pad with a zero
then &ZAPLVL = "0&ZAPLVL"
close #1
return
* Routine to assign message
-DOMSG
if (&HRC = 98) then &MSG1 = "Inadvertent line drop before file transfer was completed."
else if (&HRC = 90) then &MSG1 = "Registration file was sent successfully."
else if (&HRC = 0) then &MSG1 = "User performed hangup."
else if (&HRC = 2) then &MSG1 = "Insufficient memory for the connection."
else if (&HRC = 3) then &MSG1 = "The communication port is not operational for Connection File &CALLNAME."
else if (&HRC = 4) then &MSG1 = "User pressed ESC while dialing, cancelling the call."
else if (&HRC = 5) then &MSG1 = "Make sure modem type is correct for the communication port."
else if (&HRC = 6) then &MSG1 = "No carrier detected on line."
else if (&HRC = 7) then &MSG1 = "The other computer is busy."
else if (&HRC = 8) then &MSG1 = "Voice detected on telephone line."
else if (&HRC = 9) then &MSG1 = "No dial tone on telephone line."
else if (&HRC = 15) then &MSG1 = "Connection File '&CALLNAME' not available."
else if (&HRC = 17) then &MSG1 = "The communication port is not properly configured for Connection File &CALLNAME."
else if (&HRC = 97) then &MSG1 = "Registration PC not operational."
else if (&HRC = 96) then &MSG1 = "Invalid password detected."
else if (&HRC = 95) then &MSG1 = "Problem initiating transfer of registration file"
else if (&HRC = 94) then &MSG1 = "Problem occurred during transfer of registration file"
else if (&HRC = 93) then &MSG1 = "Registration PC already has your registration file"
else if (&HRC = 100) then &MSG1 = "Registration PC is not responding - try again later."
return