home *** CD-ROM | disk | FTP | other *** search
- #:
- #:DowJns
- .LOGON
- ############################# DOW JONES #################################
- #
- # This Dow Jones script will connect a user to the Dow Jones 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 password of the current set up file,
- # it should contain your Dow Jones password. If it is 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 "DOW JONES 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, "TERMINAL=","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 "DOW JONES SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .tymnet # set for tymnet
- set @thru = "tym"
- ttrap 2, "nothing"
- goto .dow_jones
- #
- #
- .telenet # set for telenet
- set @thru = "tel"
- #
- #
- .dow_jones # connect to dow jones service
- if @thru = "tym" # through tymnet
- tsend "dow1;;"
- end
- else # through telenet
- tsend "c dow",cr
- end
- ttrap 8,"PLEASE????","@","ame:","in:"
- if @status = "2" or @status = "3" or @status = "4" # try again
- goto .dow_jones
- end
- if @status = "0" # if nothing was recognized
- if reps # try again
- tsend cr
- goto .dow_jones
- end
- write "could not obtain Service" # else
- write "DOW JONES SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- #
- #
- .service # request service
- tsend "djns"
- .log_in # log in
- tsend cr
- ttrap 4,"PASSWORD","PLEASE????","@","ame:","in:","DOW JONES"
- if @status = "1" # send password
- if @password = "" return 0
- ttrap 2,"nothing"
- tsend @password
- goto .log_in
- end
- if @status = "2" # request service again
- goto .service
- end
- if @status = "3" or @status = "4" or @status = "5"
- goto .dow_jones # try again
- end
- if @status = "6" return 0 # ok, return
- if @status = "0" # if nothing was recognized
- if reps # try again
- goto .log_in
- end
- write "could not log in" # else
- write "DOW JONES SCRIPT ABORTED" # write an error message
- return 1 # return with error
- end
- return 1
- #
- .LOGOFF
- tsend "disc",cr
- ttrap 30, "@","in:"," name","NO CARRIER"
- if @status = "0" return 1
- return 0
- .UPLOAD
- write "Uploads not available on Dow Jones with this system script"
- return 0
- .TRANSFER
- write "Filetransfer not available on Dow Jones with this system script"
- return 0
- .END
- #:
-