;*************************** AMUS Program Label ******************************
; Filename: AMUS2.TLK                                       Date: 08/02/91
; Category: UTIL         Hash Code: XXX-XXX-XXX-XXX      Version: 4.0(100)
; Initials: ULTR/US      Name: DAVID PALLMANN
; Company: ULTRASOFT CORPORATION                   Telephone #: 5163484848
; Related Files: LIB:TALKTO.DAT
; Min. Op. Sys.: AMOSL 1.3B/AMOS32 1.0         Expertise Level: INT
; Special: REQUIRES TALKTO 4.0 (see AMUS.TLK for a TALKTO 3.x script)
; Description: TALKTO 4.0 script file to dial into AMUS network
;*****************************************************************************
;
; Script file to dial into Alpha Micro User Society (AMUS) network
;
; Before using this script file, modify it as follows:
;
;       1. Change the TELSET line, if your modem is not named MODEM, to
;          select the proper port name.
;
;       2. Change the terminal driver to match the type of terminal you are
;          using. Default in this script file is "AM65".
;
;       3. Change the login ID and PASSWORD to match the network id and
;          password that the AMUS office has assigned to you.  The default
;          id and password in this script are dummies that will not work.

;select port and set communications options

SELECT:
       TELSET MODEM/H/L
       EMULATE NONE

;dial one of the AMUS modems

DIAL:
       CALL AMUS
       IF $ GOTO ONLINE.FAST

       MESSAGE Line #1 is busy, trying line #2
       CALL AMUS2
       IF $ GOTO ONLINE.SLOW

       MESSAGE Line #2 is busy, tring line #3
       CALL AMUS3
       IF $ GOTO ONLINE.SLOW

       MESSAGE Line #3, is busy trying line #4
       CALL AMUS4
       IF $ GOTO ONLINE.SLOW

;come here when we failed to connect to any modems

NO.CONNECT:
       ALARM
       MESSAGE Unable to connect to AMUS|
       FINISH

;we are now on-line, but must output some CRs to establish our baud rate

ONLINE.SLOW:
       WHEN 'before' GOTO SIGN.ON
       REPLY |
       REPLY |
       WAIT QUIET 5
       REPLY |
       REPLY |
       WAIT QUIET 10
       REPLY |
       REPLY |

;we are now on-line, see if we can get expected response

ONLINE.FAST:
       WHEN 'before' GOTO SIGN.ON
       REPLY |
       WAIT DELAY 5
       REPLY |
       WAIT DELAY 5
       REPLY |
       WAIT DELAY 5
       REPLY |

;come here when we connected but are getting no response

NO.RESPONSE:
       ALARM
       MESSAGE Unable to get a response from AMUS|
       FINISH

;sign-on to AMUS

SIGN.ON:
       WHEN 'new mail' END
       REPLY Y|
       REPLY N|
       REPLY AM65|
       WAIT QUIET 20
       REPLY ID|
       REPLY PASSWORD|
       REPLY AM|
       WAIT STRING 'continue:'
       REPLY |
       END