home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
finance
/
ozquote4.zip
/
QUOTE4.SCR
Wrap
Text File
|
1993-09-06
|
5KB
|
164 lines
; QUOTE4.SCR
; Original script written by Herbert K. Barnett 71045,3307
; Modified 08/07/93 by Chris Clementson 72050,2635
; This OzCIS script captures quotes from CompuServe's BASICQUOTE service and
; saves them to a stand-alone text file named ``QUOTES.TXT'' (the name of the
; file can be changed, if desired). It overwrites the previous session's
; quote file, so your quotes are always up-to-date. It also captures quotes
; slightly quicker than previous versions by going directly to BASICMONEY.
; The bug that prevented previous versions from capturing more than two quote
; strings per session has been fixed.
;
; - Chris Clementson 72050,2635
; NOTE THAT THIS SCRIPT WILL HANDLE A MAXIMUM OF ONLY 19 tickers per
; pass thru BasicQuotes, not the 20 allowed by CIS. This is to
; avoid a script problem that occurs with the change in prompt
; if the maximum 20 ticker symbols are sent. The script language
; cannot accommodate an either/or WAIT condition, so the strings of
; ticker symbols must be at least one less than the maximum CIS allows.
; Set up a graceful exit if an error occurs.
ONERROR ErrorHandler
;******************** DEFINE ALL VARIABLES HERE **********************
; Set pass counter
SET #0 "1"
; This is the number of ticker strings (defined below) to send.
SET #9 "9"
; Define the ticker symbol strings to be sent. Strings $1 through $9
; can be used, and must be used in numerical sequence.
; Enter the ticker symbols for the stocks, funds or market
; indexes you desire. Separate the symbols with commas,
; and do not embed spaces in the string.
; DO NOT include more than --> 19 <-- tickers in any string!
SET $1 "DJ 30,SP 500,COMP,ALD,AA,AXP,T,BS,BA,CAT,CHV,KO,DD,EK,DIS,XON,GE,GM,GT"
SET $2 "IBM,IP,MCD,MRK,MMM,JPM,MO,PG,S,TX,UK,UTX,WX,Z"
; Additional strings can be defined as needed. Remember to change
; the value of variable #9 above, to match the number of ticker strings
; to be sent
SET $3 "APCC,CNR,DELL,MSFT"
SET $4 "BDG,BORL,BNI"
SET $5 "BS,CAG,CCC,CHV"
SET $6 "CNG,CP,CRUS,CSCO"
SET $7 "DELL,DD,EAT,EQT"
SET $8 "FLR,FSI,FSS,G,GE,GLX"
SET $9 "GT,LGNT,KM,KSU,LIZ,LUB,MCN"
;Set timeout interval in seconds
TIMEOUT 30
; Change the following "N" to "Y" if you want the script to ASK if
; it should capture stock quotes, instead of running automatically.
; You MUST use a capital "Y", not lowercase, to GOSUB Pinquiry.
SET $0 "N"
IF $0 = "Y" GOSUB Pinquiry
;*************** THIS PART OF THE SCRIPT GETS EXECUTED ON-LINE ***************
;Go to BASICMONEY
LSEND "GO BASICMONEY"
;Select (or re-select for additional passes) Basic Quotes
GetQuotes:
WAIT "!"
LSEND "1"
WAIT "Issue:"
; When capturing the first ticker string, the previous session's quote file
; will be overwritten (as designated by the /O suffix) and a mail message
; header will be written. You can change the name of the output quote file
; by substituting your own file name for ``QUOTES.TXT''.
IF #0 = "1" LSEND $1
IF #0 = "1" CAPTURE ON "QUOTES.TXT" /O
IF #0 = "1" WMH
;When capturing subsequent ticker strings, quotes will be appended to the
;current quote file
IF #0 = "2" LSEND $2
IF #0 = "2" CAPTURE ON "QUOTES.TXT"
IF #0 = "3" LSEND $3
IF #0 = "3" CAPTURE ON "QUOTES.TXT"
IF #0 = "4" LSEND $4
IF #0 = "4" CAPTURE ON "QUOTES.TXT"
IF #0 = "5" LSEND $5
IF #0 = "5" CAPTURE ON "QUOTES.TXT"
IF #0 = "6" LSEND $6
IF #0 = "6" CAPTURE ON "QUOTES.TXT"
IF #0 = "7" LSEND $7
IF #0 = "7" CAPTURE ON "QUOTES.TXT"
IF #0 = "8" LSEND $8
IF #0 = "8" CAPTURE ON "QUOTES.TXT"
IF #0 = "9" LSEND $9
IF #0 = "9" CAPTURE ON "QUOTES.TXT"
; This prompt would need to be changed from "Issue:" to "!" if the
; script included a ticker symbol string with 20 symbols.
WAIT "Issue:"
CAPTURE OFF
; As configured, this script will capture the ENS blurb (if any) and any
; messages alerting you that a ticker symbol cannot be found in BASICQUOTE.
;Return to BASICMONEY
SEND ^M
;If more strings to send, loop back. Otherwise, script terminates.
IF #0 = #9 JUMP Done
INC #0
JUMP GetQuotes
Done:
WAIT "!"
;Log off
END
;************************** END OF ON-LINE SESSION **************************
Pinquiry:
; Asks if you want stock quotes before running the script.
; This allows QUOTES.SCR to be run automatically each first
; pass while still allowing you to bypass gathering quotes on
; weekends, or if you make more than one first pass in one day.
; Note that answering Y or y runs the script, any other keypress
; cancels the script and continues with your first pass.
;
; To execute QUOTES.SCR automatically, enter this filename
; under the Prescript field in the Host configuration page.
CLS
LWRITE " "
LWRITE " "
LWRITE " "
PROMPT $0 " Do you want to capture today's stock quotes? (Y/N)"
UPCASE $0
IF $0 = "Y" RETURN
LWRITE " "
LWRITE " "
LWRITE " "
LWRITE " ---------------Continuing with the First Pass----------------"
END
; This closes the capture file and terminates the script
; in the event of a problem.
ErrorHandler:
CAPTURE OFF
FAIL