home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Time Riders in American History
/
TR_AMAZ.BIN
/
compsrv
/
scripts.lib
/
TYMNET.SCR
< prev
Wrap
Text File
|
1995-12-05
|
2KB
|
88 lines
!
! Copyright (c) 1995
! by CompuServe Incorporated, Columbus, Ohio
!
! The information in this software is subject to change without
! notice and should not be construed as a commitment by CompuServe.
!
! TYMNET:
! Connect to Tymnet
! Success: returns %Success
! Failure: saves error msg in %FailureMsg and returns %Failure
!
! Which_Tymnet: Tymnet = 1, AlaskaNet = 2, PacNet = 3
!
!+V
! "3.8.1"
!-V
A_Sent = %FALSE;
CR_Sent = %FALSE;
Host_Name = "CPS";
on cancel goto Return_Cancel;
Which_Tymnet = Arg1;
if Which_Tymnet = 2 goto Show_AlaskaNet;
if Which_Tymnet = 3 goto Show_PacNet;
show "Connecting to TYMNET";
goto Wait_Tymnet;
Show_AlaskaNet:
Host_Name = "CNS";
show "Connecting to AlaskaNet";
goto Wait_Tymnet;
Show_PacNet:
Host_Name = "CNSG";
show "Connecting to PacNet";
Wait_Tymnet:
wait
"Please " goto Send_A,
"xxx" goto Send_A,
"log in:" goto Send_Tymnet_Host,
"User Name" goto Send_Tymnet_Host,
"COMPUSERVE" goto Return_Success,
"User ID:" goto Return_Success
until 85;
if not CR_Sent goto Send_CR;
if not A_Sent goto Send_A;
goto Tymnet_Failure;
Send_CR:
send %CR & %CR;
CR_Sent = %TRUE;
goto Wait_Tymnet;
Send_A:
if A_Sent goto Wait_Tymnet;
send "A";
A_Sent = %TRUE;
goto Wait_Tymnet;
Send_Tymnet_Host:
send Host_Name & %CR;
goto Wait_Tymnet;
Tymnet_Failure:
if Which_Tymnet = 2 goto AlaskaNet_Failure;
if Which_Tymnet = 3 goto PacNet_Failure;
define %FailureMsg = "Tymnet: No answer";
exit %Failure;
AlaskaNet_Failure:
define %FailureMsg = "AlaskaNet: No answer";
exit %Failure;
PacNet_Failure:
define %FailureMsg = "PacNet: No answer";
exit %Failure;
Return_Cancel:
exit %Cancel;
Return_Success:
exit %Success;