; ----- GEnie: Dial GEnie and connect (logon)
; ----------------------------------------------------------------
;	Note: This script expects dialing directory entry #4 to be
;	a General Electric direct-dial number.	Telenet or other
;	carrier access (if available) requires different scripting.
; ----------------------------------------------------------------
;	Note: This script uses a LOGON file prepared by MKLOGON,
;	if one is available.
; ----------------------------------------------------------------
;
;	Dial GEnie direct
;
	LEGEND " Dialing GEnie direct"
	DEFTIME "60"            ; Wait 60 seconds for an incoming string
	IF NOT LINKED		; If not from alt-d
	   RESET		; Reset defaults only if not linked
	   DIAL "4"             ; Call dial dir entry number 4 (GEnie)
	   IF FAILED		; IF esc out
	      EXIT		; terminate script
	      ENDIF		; Endif failed
	   ENDIF		; End test if linked

	SET BSUPPRESS ON	; Turn on blank line suppression
	SET MASK ON		; Turn on high bit mask
	SET CDISPLAY OFF	; Ctl char display
	SET DUPLEX HALF 	; Turn echo on

	PAUSE "3"               ; Wait for the modem to settle down
	TRANSMIT "hhh"          ; Transmit
	WAITFOR "U#="           ; Wait for the 'USER ID' prompt
;
;	If we have a GENLOGON file, use it
;
	SET TTHRU OFF		; Let psw be typed
	IF ISSCFILE "GENLOGON"
	   FCALL "GENLOGON"
	ELSE
	   MESSAGE "^MEnter ID,password for GEnie:"
	   MGET S0		; Get ID/psw
	   TRANSMIT S0		; Transmit ID/psw
	   TRANSMIT "^M"        ; .. and a final c/r
	   Alarm		; Sound alarm
	   ENDIF
