home *** CD-ROM | disk | FTP | other *** search
- #:
- #:Telenet
- .LOGON
- ############################## TELENET ###################################
- #
- # This telenet script will connect and leave a user at the telenet command
- # prompt. When entering telenet this script enters a cr,cr for 1200bps
- # and a @,cr for everthing else (meaning 2400bps & 9600bps).
- #
- # 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 "TELENET.SCR ABORTED"
- return 1
- end
- reps 4 # try four times
- ttrap 2,"second wait"
- #
- #
- .begin # enter leading character
- if @baudrate = "1200"
- tsend cr
- end
- else
- tsend "@"
- end
- #
- #
- .terminal_prompt # get terminal= prompt
- tsend cr
- ttrap 7, "TERMINAL=", "@"
- if @status = "2" return 0
- if @status = "1" # if terminal= is received
- goto .terminal_prompt # goto get @ prompt
- end
- if reps # if nothing recognized
- goto .begin # try again
- end
- else # else
- write " could not log in" # write an error message
- write "TELENET SCRIPT ABORTED" # return with error
- return 1
- end
- #
- #
- .LOGOFF
- return 0
- .UPLOAD
- write "Uploads not available on telenet with this system script"
- return 0
- .TRANSFER
- write "Filetransfer not available on telenet with this system script"
- return 0
- .END
- #:
-