home *** CD-ROM | disk | FTP | other *** search
- #:
- #:Delphi
- .LOGON
- ################################# DELPHI ###################################
- #
- # This Delphi script will connect a user to the Delphi service direct or
- # through Telenet or Tymnet. It will detect the network you are calling
- # through so no modifications to the script are necessary. The automatic
- # login process is dependent on the userid and password of the current set
- # up file, it should contain your Delphi ID and password. 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 this field.
- #
- # 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 "DELPHI SCRIPT ABORTED"
- return 1
- end
- reps 4 # try four times
- ttrap 2,"second wait"
- #
- #
- .begin # try and detect telenet,tymnet or direct
- if @baudrate not = "1200"
- tsend "a","@"
- end
- else
- tsend "a",cr
- end
- tsend cr
- ttrap 8, "MINAL=","identif","log in:"," name:","Username:","Password:","fail"
- if @status = "5" or @status = "6" or @status = "7" goto .delphi # direct
- if @status = "2" tsend "a" # if status = 2,3,4 then tymnet detected
- if @status = "1" # if status = 1 then telenet detected
- tsend cr
- goto .telenet
- end
- if @status = "0" # if nothing
- if reps # and reps try again
- goto .begin
- end
- write "could not get into network" # else
- write "DELPHI SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .tymnet # set for tymnet
- set @thru = "tym"
- ttrap 2, "nothing"
- goto .get_delphi
- #
- #
- .telenet # set for telenet
- set @thru = "tel"
- #
- #
- .get_delphi # get service
- if @thru = "tym" # through tymnet
- tsend "delphi",cr
- end
- else # through telenet
- tsend "c delphi",cr
- end
- ttrap 8, "Username","@"," name:","log in:"
- if @status = "2" or @status = "3" or @status = "4" goto .get_delphi
- if @status = "0" # if nothing was recognized
- if reps # and reps try again
- goto .get_delphi
- end
- write "could not obtain service" # else
- write "DELPHI SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .delphi # log into delphi
- if @userid = "" return 0 # send userid
- tsend @userid
- .log_in
- tsend cr
- ttrap 12,"Password:","Username:","fail","@"," name:","log in:","DELPHI"
- if @status = "1" # send password
- if @password = "" return 0
- tsend @password
- goto .log_in
- end
- if @status = "2" goto .delphi # try again
- if @status = "3"
- tsend cr
- goto .delphi
- end
- if @status = "4" or @status = "5" or @status = "6" goto .get_delphi
- if @status = "6" 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" # else
- write "DELPHI 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 Delphi with this system script"
- return 0
- .TRANSFER
- write "Filetransfer not available on Delphi with this system script"
- return 0
- .END
- #:
-