home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Des Monats 1995 October
/
CD10_95.bin
/
swdirekt
/
netze
/
wincimd
/
disk1
/
scripts.lib
/
CONNECT.SCR
< prev
next >
Wrap
Text File
|
1994-12-29
|
8KB
|
375 lines
!
! Copyright (c) 1994
! 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.
!
! CONNECT:
! Handles CompuServe and Direct.
!
! NOTE: It is recommended that the numeric codes for networks NOT be
! modified since other utility programs may assume the relationships
! of network names and network ids specified below.
!
!+V
! "3.5.2"
!-V
!+N
CompuServe = 1; ! "CompuServe"
Chilepac= 28; ! "Chilepac"
CompuPass = 13; ! "CompuPass"
CSIRnet = 16; ! "CSIR-Net"
DataPac = 4; ! "DataPac"
Datex_J = 19; ! "Datex-J"
Datex_P = 10; ! "Datex-P"
FALNET = 14; ! "FALNET"
FENICSII = 24; ! "FENICS II"
Dialplus = 11; ! "GNS Dialplus"
InfoNet_Europe = 5; ! "InfoNet-Euro"
InfoNet_Korea = 29; ! "InfoNet-Kor"
InfoNet_Mexico = 31; ! "InfoNet-Mex"
InfoNet_SAfrica = 32; ! "InfoNet-RSA"
InfoNet_Taiwan = 30; ! "InfoNet-Taiw"
InfoNet_World = 6; ! "InfoNet-Wrld"
Internet = 25; ! "Internet"
ISRAKAV = 17; ! "ISRAKAV"
LATA = 7; ! "LATA"
CTLATA = 8; ! "LATA-Ct"
Mercury = 15; ! "Mercury"
NIF = 12; ! "NIFTY LL"
PacNet = 21; ! "PacNet"
PosServe = 27; ! "Pos-Serve LL"
Telenet = 2; ! "SprintNet"
Telepac = 9; ! "Telepac"
Transpac = 18; ! "Transpac"
TTNNet = 22; ! "TTN-Net"
Tymnet = 3; ! "Tymnet"
VNZNET = 23; ! "VNZ-Net"
Direkt = 40; ! "Direkt"
!-N
define %CR = "^M";
define %FALSE = 0;
define %TRUE = 1;
define %ErrorCode = 0;
hangup = 1;
UsingModem = %FALSE;
CISNetwork = %FALSE;
!
! Main Program
!
init %Port, %BaudRate;
if %_init goto Continue_Connect;
define %FailureMsg = "Konnte Schnittstelle nicht initialisieren";
define %ErrorCode = 2;
goto Connect_Fatal;
Continue_Connect:
call %Dir & "first.scr" () : Result;
if Result = %Cancel goto Cancel_Connect;
if Result = %Failure goto Connect_Failure;
if Result = %Fatal goto Connect_Fatal;
on cancel goto Cancel_Connect;
DirectConnect = (%Network = Direkt) or (%DialType = 2);
if DirectConnect goto Connect_Network;
call %Dir & "phone.scr" () : Result;
if Result = %Cancel goto Cancel_Connect;
if Result = %Failure goto Connect_Failure;
if Result = %Fatal goto Connect_Fatal;
UsingModem = %TRUE;
Connect_Network:
if %Network = CompuServe goto Connect_CIS;
if %Network = Direkt goto Connect_CIS;
if %Network = Telenet goto Connect_Telenet;
if %Network = Tymnet goto Connect_Tymnet;
if %Network = DataPac goto Connect_DataPac;
if %Network = InfoNet_Europe goto Connect_InfoNet_Europe;
if %Network = InfoNet_Korea goto Connect_InfoNet_Korea;
if %Network = InfoNet_Taiwan goto Connect_InfoNet_Taiwan;
if %Network = InfoNet_Mexico goto Connect_InfoNet_Mexico;
if %Network = InfoNet_SAfrica goto Connect_InfoNet_SAfrica;
if %Network = InfoNet_World goto Connect_InfoNet_World;
if %Network = Internet goto Connect_Internet;
if %Network = LATA goto Connect_LATA;
if %Network = CTLATA goto Connect_CTLATA;
if %Network = Telepac goto Connect_Telepac;
if %Network = Datex_P goto Connect_Datex_P;
if %Network = Datex_J goto Connect_Datex_J;
if %Network = Dialplus goto Connect_Dialplus;
if %Network = NIF goto Connect_NIF;
if %Network = CompuPass goto Connect_CompuPass;
if %Network = FALNET goto Connect_FALNET;
if %Network = Mercury goto Connect_Mercury;
if %Network = CSIRnet goto Connect_CSIRnet;
if %Network = ISRAKAV goto Connect_ISRAKAV;
if %Network = Transpac goto Connect_Transpac;
if %Network = PacNet goto Connect_PacNet;
if %Network = PosServe goto Connect_PosServe;
if %Network = TTNNet goto Connect_TTNNet;
if %Network = FENICSII goto Connect_FENICSII;
if %Network = VNZNET goto Connect_CIS;
if %Network = Chilepac goto Connect_Chilepac;
define %FailureMsg = "Netzwerk nicht unterstⁿtzt";
goto Connect_Fatal;
!
! Connect to Telenet
!
Connect_Telenet:
call %Dir & "telenet.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Tymnet
!
Connect_Tymnet:
call %Dir & "tymnet.scr" (1) : Result;
goto Handle_Network_Return;
!
! Connect to DataPac
!
Connect_DataPac:
call %Dir & "datapac.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet World
!
Connect_InfoNet_World:
call %Dir & "infonet.scr" (0) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Europe
!
Connect_InfoNet_Europe:
call %Dir & "infonet.scr" (1) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Korea
!
Connect_InfoNet_Korea:
call %Dir & "infonet.scr" (2) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Taiwan
!
Connect_InfoNet_Taiwan:
call %Dir & "infonet.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet Mexico
!
Connect_InfoNet_Mexico:
call %Dir & "infonet.scr" (4) : Result;
goto Handle_Network_Return;
!
! Connect to InfoNet South Africa
!
Connect_InfoNet_SAfrica:
call %Dir & "infonet.scr" (5) : Result;
goto Handle_Network_Return;
!
! Connect to LATA
!
Connect_LATA:
call %Dir & "lata.scr" (%TRUE) : Result;
goto Handle_Network_Return;
!
! Connect to Connecticut LATA
!
Connect_CTLATA:
call %Dir & "lata.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to Connecticut LATA
!
Connect_Internet:
call %Dir & "internet.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to Telepac
!
Connect_Telepac:
call %Dir & "telepac.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Datex-P
!
Connect_Datex_P:
call %Dir & "datexp.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Datex-J
!
Connect_Datex_J:
call %Dir & "datexj.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Dialplus
!
Connect_Dialplus:
call %Dir & "dialplus.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to NIF
!
Connect_NIF:
call %Dir & "fenics.scr" (%TRUE) : Result;
goto Handle_Network_Return;
!
! Connect to CompuPass
!
Connect_CompuPass:
call %Dir & "fenics.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to FALNET
!
Connect_FALNET:
call %Dir & "falnet.scr" (%FALSE) : Result;
goto Handle_Network_Return;
!
! Connect to Mercury
!
Connect_Mercury:
call %Dir & "mercury.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to CSIR-Net
!
Connect_CSIRnet:
call %Dir & "csirnet.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to ISRAKAV
!
Connect_ISRAKAV:
call %Dir & "israkav.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to Transpac
!
Connect_Transpac:
call %Dir & "transpac.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to AlaskaNet
!
Connect_AlaskaNet:
call %Dir & "tymnet.scr" (2) : Result;
goto Handle_Network_Return;
!
! Connect to PacNet
!
Connect_PacNet:
call %Dir & "tymnet.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to Pos-Serve
!
Connect_PosServe:
call %Dir & "posserve.scr" () : Result;
goto Handle_Network_Return;
!
! Connect to TTN-Net
!
Connect_TTNNet:
call %Dir & "ttnnet.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to FENICS II
!
Connect_FENICSII:
call %Dir & "fenics2.scr" (3) : Result;
goto Handle_Network_Return;
!
! Connect to Chilepac
!
Connect_Chilepac:
call %Dir & "chilepac.scr" (3) : Result;
goto Handle_Network_Return;
!
! Handle Network Return
!
Handle_Network_Return:
if Result = %Success goto Do_CIS_Script;
if Result = %Cancel goto Cancel_Connect;
if Result = %Fatal goto Connect_Fatal;
goto Connect_Failure;
!
! Connect to CIS
!
Connect_CIS:
CISNetwork = %TRUE;
send %CR;
Do_CIS_Script:
call %Dir & "cserve.scr" (DirectConnect, CISNetwork) : Result;
if Result = %Failure goto Connect_Failure;
if Result = %Cancel goto Cancel_Connect;
if Result = %Fatal goto Connect_Fatal;
exit %Success;
Connect_Failure:
gosub Hangup_Connect;
reset;
exit %Failure;
Connect_Fatal:
gosub Hangup_Connect;
reset;
exit %Fatal;
Hangup_Connect:
if not UsingModem goto Hangup_Done;
define %LOCAL = 1;
call %Dir & "disconct.scr" ();
Hangup_Done:
return;
Cancel_Connect:
show "Verbindung abgebrochen";
gosub Hangup_Connect;
reset;
define %ErrorCode = 1;
exit %Cancel;