home *** CD-ROM | disk | FTP | other *** search
- #:
- #:MCI
- .LOGON
- ################################## MCI ######################################
- #
- # This MCI script will connect and log a user in to MCI either directly or
- # via Tymnet. It will detect the network you are calling, an MCI direct
- # connection or through Tymnet. 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.
- #
- # 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 "MCI SCRIPT ABORTED"
- return 1
- end
- reps 4 # try four times
- ttrap 2,"second wait"
- #
- #
- .begin # try and detect MCI or Tymnet
- tsend cr
- ttrap 8,"your user name:","identifier","in:","type user name:"
- if @status = "2" # tymnet detected
- tsend "a"
- goto .begin
- end
- if @status = "1" goto .mci # MCI direct connect detected
- if @status = "0" # if nothing was recognized
- if reps # and reps try again
- goto .begin
- end
- write "could not obtain service" # else
- write "MCI SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .tymnet # Tymnet detected
- tsend "mcimail",cr # send log on to MCI
- ttrap 8,"in:","type user name:","your user name:"
- if @status = "1" or @status = "2" goto .tymnet
- if @status = "0" # if nothing was recognized
- if reps # and reps try again
- goto .tymnet
- end
- write "could't get MCI via Tymnet" # else
- write "MCI SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .mci # At MCI
- if @userid = "" return 0
- tsend @userid # send user ID
- .log_in
- tsend cr
- ttrap 5,"Password:","your user name:","initiated"
- if @status = "1"
- if @password = "" return 0
- tsend @password # send password
- goto .log_in
- end
- if @status = "2" and reps goto .mci # try again
- if @status = "3" return 0 # ok, return
- if @status = "0" # if nothing was recognized
- if reps # and reps try again
- goto .log_in
- end
- write "could not log in to MCI" # else
- write "MCI SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- return 1
- #
- #
- .LOGOFF
- tsend "exit",cr
- ttrap 30, "in:"," name","NO CARRIER"
- if @status = "0" return 1
- return 0
- .UPLOAD
- write "Uploads not available on MCI with this system script"
- return 0
- .TRANSFER
- write "Filetransfer not available on MCI with this system script"
- return 0
- .END
- #:
-