home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC/CD Gamer UK 28
/
PCGAMER28.bin
/
wincim
/
scripts.lib
/
INTERNET.SCR
< prev
next >
Wrap
Text File
|
1995-09-13
|
2KB
|
89 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.
!
! Internet:
! Success: returns %Success
! Failure: saves error msg in %FailureMsg and returns %Failure
!
!+V
! "3.6"
!-V
Tries = 5;
Sent_Host_Name = %FALSE;
on cancel goto Return_Cancel;
show "Connecting to Internet";
Wait_Time = 30;
Wait_Internet:
if Tries = 0 goto Internet_Failure;
wait
"Host Name" goto Send_Host_Name,
"User ID" goto Return_User_ID,
"? ICD" goto Process_Net_Msg,
"??ICD" goto Process_Net_Msg,
"OFF):" goto Send_Baud_Rate
until Wait_Time;
send "^M";
Wait_Time = 200;
Tries = Tries - 1;
goto Wait_Internet;
Send_Host_Name:
if Sent_Host_Name goto Reset_Host_Name;
send "CISAGREE^M";
Sent_Host_Name = %TRUE;
Wait_Time = 200;
goto Wait_Internet;
!
! Only send CISAGREE response on 1st, 3rd, & 5th attempts
! to guard against unintended double host name prompts resulting
! from sending "^M". On even attempts, eat the Host Name: prompt.
!
Reset_Host_Name:
Sent_Host_Name = %FALSE;
Tries = Tries - 1;
goto Wait_Internet;
Send_Baud_Rate:
send %BaudRate;
send "^M";
goto Return_Success;
Internet_Failure:
define %FailureMsg = "Internet not responding";
exit %Failure;
Return_Cancel:
exit %Cancel;
Return_User_ID:
send %CR;
wait until 10;
Return_Success:
exit %Success;
Process_Net_Msg:
define %ErrorCode = 31;
FailStr = "PPP connection failure, please try again";
wait
"^M" goto Found_Error
until 10;
goto Return_Fail_Msg;
Found_Error:
if %Scanned = "" goto Return_Fail_Msg;
FailStr = %Scanned;
Return_Fail_Msg:
define %FailureMsg = FailStr;
exit %Failure;