home *** CD-ROM | disk | FTP | other *** search
- ;------------------------------------------------------
- ;
- ;CSERVE_A.SCR --- The script file for CompuServe
- ;
- ;------------------------------------------------------
- ;
- ; We begin with the format specifiers to which allow
- ;the script to identify where the MailId, RealName,
- ;and Subject texts are in a newly downloaded letter.
- ;
- Format
- Reply to: $SUBJECT$\n
- Subject: $SUBJECT$\n
- Subj: $SUBJECT$\n
- From: [$UID$] $NAME$\n
- From: $NAME$[$UID$]
- From: $NAME$>$UID$\n
- From: $UID$\n
- Endformat
- ;
- ;------------------------------------------------------
- ; The following is a set of aliases which define the
- ; various prompts that CIS will send.
- ;
- Alias cishost 'Host Name:'
- Alias cisprompt 'Enter choice'
- Alias loginprompt '\nUser ID: '
- Alias passwdprompt '\nPassword:'
- Alias presscr 'Press <CR>!'
- ;
- ; The following aliases define the banner lines for
- ; various areas of the CIS system
- ;
- Alias mailmenubanner 'Mail Main Menu'
- Alias msgmenubanner '\nCompuServe Mail Message Menu'
- ;
- ;------------------------------------------------------
- ; The following alias determines what intermediate network
- ; will be assumed. It can be one of the following:
- ;
- ; DIRECT Direct connection to CIS Packet Net
- ; SPRINT Connect through SprintNet
- ; TYMNET Connect through TymNet
- ;
- Alias connectype DIRECT
- ;
- ; The following alias should be set TRUE if your modem
- ; drops carrier every time you make a connection. This
- ; alias simply forces the script to wait 2 seconds for
- ; the connection to settle before starting the script.
- ;
- Alias waitasec FALSE
- ;
- ;------------------------------------------------------
- ; The following aliases cause the script to use
- ; XMODEM for the transfer protocol. Comment them
- ; out if you wish to use ASCII instead:
- ;
- ;Alias dnloadproto REQUEST_XMODEM_DNLOAD
- ;Alias uploadproto REQUEST_UPLOAD_XMODEM
- ;
- ; Uncomment the following aliases if you wish to
- ; use ASCII transfers:
- ;
- Alias dnloadproto REQUEST_ASCII_DNLOAD
- Alias uploadproto REQUEST_UPLOAD_ASCII
- ;
- ;------------------------------------------------------
- ; This is the main entry-point for the script, which
- ; decides which intermediate network will be used to
- ; connect to CompuServe.
- ;
- Begin START
- If %waitasec% Then WAIT_START
- If TRUE Then %connectype%
- End
- Begin WAIT_START
- Timeout 2 Goto %connectype%
- End
- ;
- ;------------------------------------------------------
- ; This is the entry point for a direct dial-in to CIS
- ; Packet Net. Basically it begins by sending a Control-C
- ; every three seconds until we see a 'User ID' prompt.
- ;
- Begin DIRECT
- Caption 'connected'
- Control C
- When %cishost% Goto CIS_HOST
- When %loginprompt% Goto USERNAME
- Timeout 3 Goto DIRECT
- End
- ;------------------------------------------------------
- ; This is the entry point for a dial-in to CIS via
- ; SprintNet.
- ;
- Alias sprintterm 'TERMINAL='
- Begin SPRINT
- Timeout 2 Goto SPRINT0
- End
- Begin SPRINT0
- Caption 'connected'
- Transmit '@'
- Timeout 1 Goto SPRINTCR
- End
- Begin SPRINTCR
- Cr
- When %sprintterm% Goto SPRINT_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 8 Goto SPRINT1
- End
- Begin SPRINT1
- Transmit '@'
- Timeout 1 Goto SPRINTCR1
- End
- Begin SPRINTCR1
- Cr
- When %sprintterm% Goto SPRINT_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 8 Goto SPRINT2
- End
- Begin SPRINT2
- Transmit '@'
- Timeout 1 Goto SPRINTCR2
- End
- Begin SPRINTCR2
- Cr
- When %sprintterm% Goto SPRINT_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 30 Goto NO_LOGIN
- End
- Begin SPRINT_TERM
- Transmit 'D1'
- Cr
- When '@' Goto SPRINT_LOGIN
- When %sprintterm% Goto SPRINT_TERM
- Timeout 30 Goto NO_LOGIN
- End
- Begin SPRINT_LOGIN
- Transmit 'C 614227'
- Cr
- When %cishost% Goto CIS_HOST
- When %loginprompt% Goto USERNAME
- When '@' Goto SPRINT_LOGIN2
- Timeout 45 Goto NO_LOGIN
- End
- Begin SPRINT_LOGIN2
- Transmit 'C 202202'
- Cr
- When %cishost% Goto CIS_HOST
- When %loginprompt% Goto USERNAME
- Timeout 45 Goto NO_LOGIN
- End
- ;------------------------------------------------------
- ; This is the entry point for a dial-in to CIS via
- ; TymNet.
- ;
- Alias tymterm 'terminal identifier'
- Alias tymlogin 'please log in'
- Alias tymcis 'CML05'
- Begin TYMNET
- Caption 'connected'
- When %tymterm% Goto TYMNET_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 5 Goto TYMNET1
- End
- Begin TYMNET1
- Cr
- When %tymterm% Goto TYMNET_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 5 Goto TYMNET2
- End
- Begin TYMNET2
- Cr
- When %tymterm% Goto TYMNET_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 15 Goto NO_LOGIN
- End
- Begin TYMNET_TERM
- Transmit 'A'
- When %tymlogin% Goto TYMNET_LOGIN
- When %tymterm% Goto TYMNET_TERM
- CarrierLoss Goto NO_LOGIN
- Timeout 15 Goto NO_LOGIN
- End
- Begin TYMNET_LOGIN
- Transmit %tymcis%
- Cr
- When %tymlogin% Goto TYMNET_LOGIN
- When %cishost% Goto CIS_HOST
- When %loginprompt% Goto USERNAME
- CarrierLoss Goto NO_LOGIN
- Timeout 45 Goto NO_LOGIN
- End
- ;
- ;------------------------------------------------------
- ; These states perform the login process into CIS
- ;
- Begin CIS_HOST
- Transmit 'CIS,DOMESTIC'
- Cr
- When %cishost% Goto CIS_HOST
- When %loginprompt% Goto USERNAME
- Timeout 45 Goto NO_LOGIN
- End
- Begin USERNAME
- Caption 'logging in'
- Transmit $USERNAME
- Cr
- When %passwdprompt% Goto PASSWORD
- When %loginprompt% Goto USERNAME
- Timeout 20 Goto NO_LOGIN
- End
- Begin PASSWORD
- Transmit $PASSWORD
- Cr
- When %passwdprompt% Goto PASSWORD
- When %loginprompt% Goto USERNAME
- When 'CompuServe Information Service' Goto LOGGED_IN
- Timeout 20 Goto NO_LOGIN
- End
- Begin LOGGED_IN
- Caption 'logged in'
- When %msgmenubanner% Goto MESSAGE_MENU
- When 'New This Week' Goto NEW_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 30 Goto JUMP_TO_MAIL
- End
- Begin NEW_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto JUMP_TO_MAIL
- End
- ;------------------------------------------------------
- ; These states deal with getting from wherever we are
- ; into the CIS Mail Area.
- ;
- Begin JUMP_TO_MAIL
- Transmit 'go email'
- Cr
- When 'Mail Message Menu' Goto MESSAGE_MENU
- When 'additional information (Y or N)!' Goto ANSWER_NO
- When 'is temporarily unavailable' Goto MAIL_UNAVAILABLE
- When %mailmenubanner% Goto MAIL_MAIN_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto GIVE_UP
- End
- Begin ANSWER_NO
- Transmit 'N'
- Cr
- When 'Mail Message Menu' Goto MESSAGE_MENU
- When 'additional information (Y or N)!' Goto ANSWER_NO
- When %mailmenubanner% Goto MAIL_MAIN_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto GIVE_UP
- End
- ;------------------------------------------------------
- ; At this point we're entering the main menu of the
- ; mail area. These states detect if there's mail,
- ; and if there is it initiates a download of the next
- ; letter in line. If not, and there are more letters
- ; to deliver, an upload is initiated
- ;
- Begin MAIL_MAIN_MENU
- Caption 'Mail Area'
- When '*** No mail waiting ***' Goto NO_MAIL_WAITING
- When 'letters waiting' Goto MAIL_WAITING
- When 'letter waiting' Goto MAIL_WAITING
- When 'message pending' Goto MAIL_WAITING
- When 'messages pending' Goto MAIL_WAITING
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto GIVE_UP
- End
- Begin MAIL_WAITING
- If FETCHING Then FETCH_FROM_MAIN_MENU
- If MORE_LETTERS Then SEND_MAIL
- When %cisprompt% Goto LOG_OFF
- Timeout 20 Goto LOG_OFF
- End
- Begin NO_MAIL_WAITING
- Caption 'No Mail'
- If MORE_LETTERS Then SEND_MAIL
- When %cisprompt% Goto LOG_OFF
- Timeout 20 Goto GIVE_UP
- End
- ;------------------------------------------------------
- ; These states are run when the silly "Message Menu"
- ; appears at login time. If the script is fetching
- ; mail, it will initiate a download of a letter from
- ; this menu. Note that only one letter will be downloaded,
- ; if there are more, the script gets the rest from the
- ; normal Mail Menu.
- ;
- Begin MESSAGE_MENU
- Caption 'You have mail'
- If FETCHING Then FETCH_FROM_MESSAGE_MENU
- When 'M for CompuServe Mail' Goto JUMP_TO_MAIL
- Timeout 15 Goto JUMP_TO_MAIL
- End
- Begin FETCH_FROM_MESSAGE_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- When 'M for CompuServe Mail' Goto %dnloadproto%
- Timeout 15 Goto %dnloadproto%
- End
- ;------------------------------------------------------
- ; These states initiate a download of a letter, instruct
- ; RFD Mail to put the new letter into the In Box, then
- ; delete the letter on the CIS side.
- ;
- Begin FETCH_FROM_MAIN_MENU
- When %cisprompt% Goto %dnloadproto%
- Timeout 15 Goto %dnloadproto%
- End
- Begin REQUEST_XMODEM_DNLOAD
- Caption 'Fetching Mail'
- Transmit 'download/PRO:XMODEM 1'
- Cr
- When 'characters ready' Goto PAUSE_BEFORE_DOWNLD
- When 'for download' Goto PAUSE_BEFORE_DOWNLD
- When 'Starting XMODEM' Goto PAUSE_BEFORE_DOWNLD
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto ABORT_DOWNLD
- End
- Begin ABORT_DOWNLD
- Control X
- Control X
- Control X
- Control X
- Control X
- Control X
- Control X
- Control C
- When 'Press CR!' Goto JUMP_TO_MAIL
- Timeout 20 Goto JUMP_TO_MAIL
- End
- Begin PAUSE_BEFORE_DOWNLD
- Timeout 2 Goto DOWNLD_XMODEM
- End
- Begin DOWNLD_XMODEM
- Download XMODEM Then DOWNLD_SUCCESS_XMODEM Else GIVE_UP
- End
- Begin DOWNLD_SUCCESS_XMODEM
- Confirm LETTER.RECEIVED Successful
- Caption 'Letter Received'
- When 'Transfer Completed' Goto WAIT_DOWNLD_CR
- When %presscr% Goto SEND_DOWNLD_CR
- When 'Message Menu' Goto WAIT_DELETE_LETTER
- Timeout 5 Goto SEND_DOWNLD_CR
- End
- Begin REQUEST_ASCII_DNLOAD
- Caption 'Fetching Mail'
- Transmit 'download/PRO:CAPTURE 1'
- Cr
- When 'capture buffer...' Goto DOWNLD_ASCII
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto DOWNLD_ASCII
- End
- Begin DOWNLD_ASCII
- Download ASCII 'Capture buffer closed' Then DOWNLD_SUCCESS_ASCII Else GIVE_UP
- End
- Begin DOWNLD_SUCCESS_ASCII
- Confirm LETTER.RECEIVED Successful
- Caption 'Letter Received'
- Cr
- When 'Message Menu' Goto WAIT_DELETE_LETTER
- When %presscr% Goto SEND_DOWNLD_CR
- When %mailmenubanner% Goto WAIT_DELETE_LETTER
- Timeout 10 Goto SEND_DOWNLD_CR
- End
- Begin WAIT_DOWNLD_CR
- When %presscr% Goto SEND_DOWNLD_CR
- Timeout 5 Goto SEND_DOWNLD_CR
- End
- Begin SEND_DOWNLD_CR
- Cr
- When %presscr% Goto SEND_DOWNLD_CR
- When %mailmenubanner% Goto WAIT_DELETE_LETTER
- When 'M for CompuServe' Goto DELETE_LETTER
- Timeout 20 Goto RETRY_DELETE_LETTER
- End
- Begin WAIT_DELETE_LETTER
- When %cisprompt% Goto DELETE_LETTER
- When 'for CompuServe Mail main menu' Goto DELETE_LETTER
- Timeout 15 Goto RETRY_DELETE_LETTER
- End
- Begin RETRY_DELETE_LETTER
- Transmit 'go email'
- Cr
- When %mailmenubanner% Goto WAIT_DELETE_LETTER
- When %cisprompt% Goto DELETE_LETTER
- Timeout 15 Goto GIVE_UP
- End
- Begin DELETE_LETTER
- Caption 'Deleting Letter'
- Transmit 'delete 1'
- Cr
- When %presscr% Goto SEND_DELETE_CR
- When 'M for CompuServe Mail' Goto JUMP_TO_MAIL
- Timeout 10 Goto SEND_DELETE_CR
- End
- Begin SEND_DELETE_CR
- Cr
- When 'M for CompuServe Mail' Goto JUMP_TO_MAIL
- When %mailmenubanner% Goto MAIL_MAIN_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 10 Goto JUMP_TO_MAIL
- End
- ;------------------------------------------------------
- ; These states are executed for each letter to be
- ; sent. First the current letter is uploaded, then
- ; it is addressed, then finally the delivery is
- ; confirmed.
- ;
- Begin SEND_MAIL
- When %cisprompt% Goto %uploadproto%
- Timeout 20 Goto GIVE_UP
- End
- Begin REQUEST_UPLOAD_XMODEM
- Transmit 'UPLOAD/TYP:ASC/PRO:XMODEM'
- Cr
- When %cisprompt% Goto REQUEST_UPLOAD_XMODEM
- When 'Starting XMODEM' Goto PAUSE_BEFORE_UPLOAD
- When 'XMODEM transfer' Goto PAUSE_BEFORE_UPLOAD
- When 'Key <CR>' Goto PAUSE_BEFORE_UPLOAD
- Timeout 20 Goto GIVE_UP
- End
- Begin PAUSE_BEFORE_UPLOAD
- NewLetter
- Timeout 2 Goto BEGIN_XMODEM_UPLOAD
- End
- Begin BEGIN_XMODEM_UPLOAD
- Upload XMODEM Then UPLOAD_XMODEM_SUCCESS Else GIVE_UP
- End
- Begin UPLOAD_XMODEM_SUCCESS
- Caption 'Letter Uploaded'
- When '*** File Transfer Completed! ***' Goto END_LETTER_UPLOAD
- When %presscr% Goto REQUEST_SEND_MENU
- When 'CompuServe Mail Send Menu' Goto MAIL_SEND_MENU
- Timeout 10 Goto REQUEST_SEND_MENU
- End
- Begin REQUEST_UPLOAD_ASCII
- Transmit 'UPLOAD/TYP:ASC/PRO:CAPTURE'
- Cr
- When %cisprompt% Goto REQUEST_UPLOAD_ASCII
- When 'prompted for each line (Y/N)?' Goto CONFIRM_UPLOAD_ASCII
- Timeout 20 Goto GIVE_UP
- End
- Begin CONFIRM_UPLOAD_ASCII
- Transmit 'N'
- Cr
- When 'prompted for each line (Y/N)?' Goto CONFIRM_UPLOAD_ASCII
- When 'the end of your data.' Goto BEGIN_ASCII_UPLOAD
- Timeout 20 Goto GIVE_UP
- End
- Begin BEGIN_ASCII_UPLOAD
- NewLetter
- Upload ASCII Then UPLOAD_ASCII_SUCCESS Else GIVE_UP
- End
- Begin UPLOAD_ASCII_SUCCESS
- Caption 'Letter Uploaded'
- Control Z
- When '*** File Transfer Completed! ***' Goto END_LETTER_UPLOAD
- When %presscr% Goto REQUEST_SEND_MENU
- When 'CompuServe Mail Send Menu' Goto MAIL_SEND_MENU
- Timeout 10 Goto REQUEST_SEND_MENU
- End
- Begin END_LETTER_UPLOAD
- When %presscr% Goto REQUEST_SEND_MENU
- Timeout 20 Goto GIVE_UP
- End
- Begin REQUEST_SEND_MENU
- Cr
- When %presscr% Goto REQUEST_SEND_MENU
- When 'CompuServe Mail Send Menu' Goto MAIL_SEND_MENU
- When 'For current message' Goto MAIL_SEND_MENU
- Timeout 20 Goto GIVE_UP
- End
- Begin MAIL_SEND_MENU
- When %cisprompt% Goto REQUEST_LETTER_SEND
- Timeout 20 Goto GIVE_UP
- End
- Begin REQUEST_LETTER_SEND
- If LETTER.RECEIPT Then SEND_RECEIPT
- Transmit 'SEND'
- Cr
- When 'CompuServe Mail Send Menu' Goto MAIL_SEND_MENU
- When %cisprompt% Goto REQUEST_LETTER_SEND
- When 'to (Name or User ID): ' Goto SEND_DEST_USERNAME
- Timeout 20 Goto GIVE_UP
- End
- Begin SEND_RECEIPT
- Caption 'Sending Receipt'
- Transmit 'SEND/REC'
- Cr
- When 'CompuServe Mail Send Menu' Goto MAIL_SEND_MENU
- When %cisprompt% Goto REQUEST_LETTER_SEND
- When 'to (Name or User ID): ' Goto SEND_DEST_USERNAME
- Timeout 20 Goto GIVE_UP
- End
- Begin SEND_DEST_USERNAME
- Caption 'Sending Letter'
- Transmit $LETTER.DEST.USERNAME
- If LETTER.CC Then BEGIN_CC
- Cr
- When 'Subject: ' Goto SEND_SUBJECT
- When 'to (Name or User ID): ' Goto SEND_DEST_USERNAME
- When 'Enter correction or <CR> to omit:' Goto BAD_ADDRESS
- When 'and address correct? (Y or N)! ' Goto CONFIRM_LETTER
- Timeout 20 Goto GIVE_UP
- End
- Begin SEND_SUBJECT
- Transmit (40) $LETTER.SUBJECT
- Cr
- When 'Subject: ' Goto SEND_SUBJECT
- When 'Your name: ' Goto SEND_REAL_NAME
- When 'address correct? (Y or N)! ' Goto CONFIRM_LETTER
- Timeout 20 Goto GIVE_UP
- End
- Begin BEGIN_CC
- Caption 'Sending CC'
- Transmit ';'
- Cr
- CreateCC 50 80 Delimiter ';;'
- When 'Also send to?:' Goto SEND_CC
- Timeout 20 Goto GIVE_UP
- End
- Begin SEND_CC
- Transmit $LETTER.CC
- Cr
- If LETTER.CC Then CONTINUE_CC
- When 'Also send to?:' Goto SEND_CC
- When 'Subject: ' Goto SEND_SUBJECT
- When 'Enter correction or <CR> to omit:' Goto BAD_ADDRESS
- When 'and address correct? (Y or N)! ' Goto CONFIRM_LETTER
- Timeout 20 Goto GIVE_UP
- End
- Begin CONTINUE_CC
- Caption 'Sending CC...'
- CreateCC 50 80 Delimiter ';;'
- When 'Also send to?:' Goto SEND_CC
- Timeout 20 Goto GIVE_UP
- End
- Begin SEND_REAL_NAME
- Transmit $YOURNAME
- Cr
- When 'and address correct? (Y or N)! ' Goto CONFIRM_LETTER
- When 'Your name: ' Goto SEND_REAL_NAME
- When 'or N) !' Goto ANSWER2_YES
- Timeout 20 Goto GIVE_UP
- End
- Begin ANSWER2_YES
- Transmit 'Y'
- Cr
- When 'address correct? (Y or N)! ' Goto CONFIRM_LETTER
- Timeout 20 Goto GIVE_UP
- End
- Begin CONFIRM_LETTER
- Transmit 'Y'
- Cr
- When 'and address correct? (Y or N)! ' Goto CONFIRM_LETTER
- When 'Message sent to ' Goto LETTER_SEND_CONFIRMED
- Timeout 20 Goto GIVE_UP
- End
- Begin LETTER_SEND_CONFIRMED
- Confirm LETTER.SENT Successful
- Caption 'Letter Delivered'
- When %presscr% Goto BACK_TO_MAIL_MENU
- Timeout 20 Goto GIVE_UP
- End
- ;------------------------------------------------------
- ; These states deal with recovering from a bad address
- ; or CC, then put us back into the main Mail area.
- ;
- Begin BAD_ADDRESS
- Caption 'Unknown Address'
- Cr
- When 'Subject:' Goto SEND_NULL_SUBJ
- When %cisprompt% Goto LETTER_ABORTED
- Timeout 30 Goto GIVE_UP
- End
- Begin SEND_NULL_SUBJ
- Cr
- When %presscr% Goto SEND_CR_ABORT
- When %cisprompt% Goto LETTER_ABORTED
- Timeout 20 Goto GIVE_UP
- End
- Begin SEND_CR_ABORT
- Cr
- When %presscr% Goto SEND_CR_ABORT
- When %cisprompt% Goto LETTER_ABORTED
- Timeout 20 Goto GIVE_UP
- End
- Begin LETTER_ABORTED
- Caption 'Letter NOT Delivered'
- Cr
- Confirm LETTER.SENT Unsuccessful
- When 'CompuServe Mail Main Menu' Goto MAIL_MAIN_MENU
- When %presscr% Goto BACK_TO_MAIL_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto JUMP_TO_MAIL
- End
- ;------------------------------------------------------
- ; This is where we check to see if we have more letters
- ; to send before we log off. If so, we jump back to the
- ; main Mail Menu.
- ;
- Begin BACK_TO_MAIL_MENU
- Cr
- If MORE_LETTERS Then PREPARE_TO_SEND_MORE
- When 'CompuServe Mail Main Menu' Goto WAIT_TO_LOG_OFF
- When %presscr% Goto BACK_TO_MAIL_MENU
- When %cisprompt% Goto LOG_OFF
- Timeout 20 Goto GIVE_UP
- End
- Begin PREPARE_TO_SEND_MORE
- When 'CompuServe Mail Main Menu' Goto MAIL_MAIN_MENU
- When %presscr% Goto BACK_TO_MAIL_MENU
- When %cisprompt% Goto JUMP_TO_MAIL
- Timeout 20 Goto JUMP_TO_MAIL
- End
- ;------------------------------------------------------
- ; These states will be run if we get a "mail system down"
- ; response when the script attempts to go into the
- ; Mail area.
- ;
- Begin MAIL_UNAVAILABLE
- Caption 'Mail System Down'
- When %presscr% Goto MAIL_UNAVAILABLE_CR
- Timeout 20 Goto GIVE_UP
- End
- Begin MAIL_UNAVAILABLE_CR
- Cr
- When %cisprompt% Goto LOG_OFF
- Timeout 20 Goto GIVE_UP
- End
- ;------------------------------------------------------
- ; These states deal with logging off the system
- ;
- Begin WAIT_TO_LOG_OFF
- When %cisprompt% Goto LOG_OFF
- Timeout 20 Goto GIVE_UP
- End
- Begin LOG_OFF
- Transmit 'off'
- Cr
- Caption 'Logging off'
- When 'NO CAR' Goto EXIT_PROGRAM
- When 'Disconnected' Goto HANGUP
- When 'DISCONNECTED' Goto HANGUP
- When %tymlogin% Goto HANGUP
- When 'Do you wish to exit CompuServe Mail anyway?' Goto CONFIRM_LOGOFF
- When %cisprompt% Goto LOG_OFF
- CarrierLoss Goto EXIT_PROGRAM
- Timeout 20 Goto SPRINT_BYE
- End
- Begin CONFIRM_LOGOFF
- Transmit 'Y'
- Cr
- When 'NO CAR' Goto EXIT_PROGRAM
- When 'Disconnected' Goto HANGUP
- When 'DISCONNECTED' Goto HANGUP
- When %tymlogin% Goto HANGUP
- When 'Do you wish to exit CompuServe Mail anyway?' Goto CONFIRM_LOGOFF
- When %cisprompt% Goto LOG_OFF
- CarrierLoss Goto EXIT_PROGRAM
- Timeout 20 Goto SPRINT_BYE
- End
- Begin SPRINT_BYE
- Cr
- Transmit '@'
- Cr
- When '@' Goto SPRINT_DISC
- CarrierLoss Goto EXIT_PROGRAM
- Timeout 10 Goto HANGUP
- End
- Begin SPRINT_DISC
- Transmit 'D'
- Cr
- CarrierLoss Goto EXIT_PROGRAM
- Timeout 5 Goto HANGUP
- End
- Begin EXIT_PROGRAM
- Caption 'Logged off'
- CarrierLoss Goto EXIT_PROGRAM
- Timeout 3 Goto BYE_BYE
- End
- Begin HANGUP
- Hangup
- CarrierLoss Goto EXIT_PROGRAM
- End
- Begin GIVE_UP
- Caption 'Aborting'
- Hangup
- CarrierLoss Goto EXIT_PROGRAM
- End
- Begin NO_LOGIN
- Caption 'login failed'
- Timeout 5 Goto EXIT_PROGRAM
- End
- Begin BYE_BYE
- Exit
- End
-
-