home *** CD-ROM | disk | FTP | other *** search
- #:
- #:NewsNet
- .LOGON
- ################################ NEWSNET ##################################
- #
- # This Newsnet script will connect a user to the Newsnet service
- # 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 Newsnet 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 "NEWSNET SCRIPT ABORTED"
- return 1
- end
- reps 4 # try four times
- ttrap 2,"second wait"
- #
- #
- .begin # try and detect telenet or tymnet
- if @baudrate not = "1200"
- tsend "a","@"
- end
- else
- tsend "a",cr
- end
- tsend cr
- .identify
- ttrap 8, "MINAL=","identifier","log in:","ame:"
- 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 "NEWSNET SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .tymnet # set for tymnet
- set @thru = "tym"
- ttrap 3, "nothing"
- goto .newsnet
- #
- #
- .telenet # set for telenet
- set @thru = "tel"
- #
- #
- .newsnet # connect to newsnet service
- if @thru = "tym" # through tymnet
- tsend "net"
- end
- else # through telenet
- tsend "c net"
- end
- .log_in_process # begin newsnet login loop
- tsend cr
- ttrap 12, "-->","word?","@","ame:","log in:","NNNNNNNNNN"
- if @status = "1" # send id
- if @userid = "" return 0
- tsend @userid
- goto .log_in_process
- end
- if @status = "2" # send password
- if @password = "" return 0
- tsend @password
- goto .log_in_process
- end
- if @status = "3" or @status = "4" or @status = "5" goto .newsnet
- if @status = "6" return 0 # ok, return
- if @status = "0" # if nothing was recognized
- if reps # and reps try again
- goto .log_in_process
- end
- write "could not log in" # else
- write "NEWSNET 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 NewsNet with this system script"
- return 0
- .TRANSFER
- write "Filetransfer not available on NewsNet with this system script"
- return 0
- .END
- #:
-