home *** CD-ROM | disk | FTP | other *** search
- ; $Id: sprntnet.dcp 1.4 1994/01/10 14:12:10 slc Exp $
- ;**************************************************************************
- ;* SPRNTNET.DCP
- ;*
- ;* Description : LEXIS/NEXIS Research Software SprintNet Login Module
- ;*
- ;* Target version: LEXIS/NEXIS Research Software Custom Build of
- ;* DynaComm Asyncronous version 3.10.02
- ;*
- ;* Copyright (C) 1992 - 1993 by FutureSoft Engineering, All Rights Reserved
- ;*
- ;**************************************************************************
-
- *Login( $szNodeID )
-
- PERFORM "WLXLOGIN*LoginUpdateProgressDialog"( "Accessing SprintNet", "_HOUR3" )
-
- #Waiting = FALSE
- ;-------------------------------------------------------------
- ; Set a timer for one minute to be activated at a WAIT command
- ;-------------------------------------------------------------
- WHEN TIMER "00:01:00"
- BEGIN
- ;------------------------------------------
- ; Cancel the WHEN's defined in this routine
- ;------------------------------------------
- WHEN CANCEL TIMER
- WHEN CANCEL STRING 0
-
- ;----------------------------------------------
- ; Set the result string for the calling routine
- ;----------------------------------------------
- SET RESULT "TIMEOUT"
- if #Waiting
- RESUME
- else
- RETURN
- END
-
- ;---------------------------------------------------------
- ; Execute the following block of code when the "TERMINAL="
- ; string is received while at the WAIT RESUME command.
- ;---------------------------------------------------------
- WHEN STRING 0 "TERMINAL="
- BEGIN
- ;-----------------
- ; Cancel this WHEN
- ;-----------------
- WHEN CANCEL STRING 0
- ;-----------------------------------------------------------
- ; Execute the following block of code when the '@' character
- ; is received while at the WAIT RESUME command.
- ;-----------------------------------------------------------
- WHEN STRING 1 "@"
- BEGIN
- ;-----------------
- ; Cancel this WHEN
- ;-----------------
- WHEN CANCEL STRING 1
- ;----------------------------------------------------------
- ; Resume script execution following the WAIT RESUME command
- ;----------------------------------------------------------
- RESUME
- END ; when string 1
- ;------------------------------------------------------
- ; Send a string to SprintNet in response to "TERMINAL="
- ;------------------------------------------------------
- SEND "D1"
- END ; when string 0
-
- ;-----------------------------------------
- ; Begin script execution here
- ;-----------------------------------------
-
- ;--------------------------------
- ; Pause 2 seconds before starting
- ;--------------------------------
- WAIT QUIET "2"
-
- ;-----------------------------------
- ; If the baud rate is less than 2400
- ;-----------------------------------
- if (NUM(SETTINGS(BAUDRATE)) < 2400)
- BEGIN
- ;-----------------------
- ; Send a carriage return
- ;-----------------------
- SEND ""
- ;----------------
- ; Wait one second
- ;----------------
- WAIT DELAY "1"
- SEND ";"
- END
- else
- BEGIN
- ;-------------------------------------------------
- ; Send the '@' character without a carriage return
- ;-------------------------------------------------
- SEND NOCR "@"
- ;----------------
- ; Wait one second
- ;----------------
- WAIT DELAY "1"
- ;-----------------------
- ; Send a carriage return
- ;-----------------------
- SEND ""
- END
-
- ;-----------------------------------------------------------------------------
- ; Allow this script to be cancelled as a result of the user pressing the
- ; "Cancel" button in the login progress dialog created by the calling routine.
- ;-----------------------------------------------------------------------------
- if (#bCancel)
- BEGIN
- WHEN CANCEL TIMER
- WHEN CANCEL STRING 0
- WHEN CANCEL STRING 1
- ;----------------------------------------------
- ; Set the result string for the calling routine
- ;----------------------------------------------
- SET RESULT "CANCEL"
- RETURN
- END
-
- ;---------------------------------------------
- ; Wait for string to be received from the host
- ;---------------------------------------------
- #Waiting = TRUE
- WAIT RESUME
- #Waiting = FALSE
-
- if (RESULT() == "TIMEOUT")
- RETURN
-
- ;-----------------------
- ; Check for cancel again
- ;-----------------------
- if (#bCancel)
- BEGIN
- WHEN CANCEL TIMER
- WHEN CANCEL STRING 0
- WHEN CANCEL STRING 1
- SET RESULT "CANCEL"
- RETURN
- END
-
- ;----------------------------
- ; Send the predefined node id
- ;----------------------------
- SEND TRIM($szNodeID)
-
- ;--------------------------------------------------------------
- ; Cancel the WHEN TIMER before returning to the calling routine
- ;--------------------------------------------------------------
- WHEN CANCEL TIMER
-
- RETURN
-
-