home *** CD-ROM | disk | FTP | other *** search
- #:
- #:CompuSv
- .LOGON
- ############################# CompuServe ####################################
- #
- # This CompuServe script will connect, log a user in and leave them at the
- # CompuServe command prompt. The automatic login process is dependent on
- # the userid and password of the current set up file, if either of these
- # are null the script will return control to the user to complete the log
- # in manually. Hint: watch out for blank characters in these fields. Also,
- # if the user wishes to go into PCMAG then there are two lines that must
- # be switched (one is a comment).
- #
- # You may incorporate this script into the systems.scr script, use it as a
- # stand alone systems script or as a regular script. If you choose to insert
- # this script into systems.scr you must make three modifications. When the
- # systems.scr (or modems.scr) files are indexed our index utility is looking
- # specifically for colons; therefore, the # must be deleted from the first
- # two lines and from the last line of this file. Once these items have been
- # changed, copy this script into systems.scr and re-index (See the Users
- # manual for instructions on the index utility).
- #
- ###############################################################################
- #
- #
- connect # make the connection
- if @status not = "0" # if no connection - return with error
- write "connection not estabished"
- write "COMPUSERVE SCRIPT ABORTED"
- return 1
- end
- reps 4 # try three times
- ttrap 2,"second wait"
- #
- #
- .login # Login to CompuServe
- tsend cr
- ttrap 7, "ame:","ID:","word:","CompuServe"
- if @status = "1" # send host
- tsend "cps"
- goto .login
- end
- if @status = "2" and reps # send ID
- if @userid = "" return 0 # if no userid return control to user
- tsend @userid
- goto .login
- end
- if @status = "3" and reps # send password
- if @password = "" return 0 # if no password return control to user
- tsend @password
- goto .login
- end
- if @status = "4" # login successful !!!
- return 0 # insert a # for PCMAG or delete line
- #goto .pcmag # delete # for PCMAG
- end
- if reps # if nothing was recognized
- goto .login # try again
- end
- else # else
- write "could not log in" # write an error message
- write "COMPUSERVE SCRIPT ABORTED" # return with error
- return 1
- end
- #
- #
- .pcmag # get into PCMAG
- tsend "go PCMAG",cr
- ttrap 20, "PCMAG"
- if @status = "1" # if in return ok
- wait 3
- return 0
- end
- if @status = "0" # if nothing was recognized
- if reps # and reps try again
- tsend cr
- goto .pcmag
- end
- write "could not get PCMAGNET" # else
- write "COMPUSERVE SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- return 1
- #
- #
- .LOGOFF
- return 0
- .UPLOAD
- write "Uploads not available on CompuServe with this system script"
- return 0
- .TRANSFER
- write "Filetransfer not available on CompuServe with this system script"
- return 0
- .END
- #:
-