Al,
I used the following scripts. You'll have to edit the scpec file for your needs. You'll need winbatch from windowware.com.
Happy scanning
P.S.
Its gonna take two messages to post this....
XXXXXXXXXXXXXXXXXXXX SPEC FILE XXXXXXXXXXXXXXXXXXXXXXXXXXX ; ; define the directories ; POINTERS: ; qpInstallPath "e:\quotpls2" qpDataPath "d:\qp2data\" qpListArchPath "e:\quotplus\oldlists" logFile "e:\Automation\qplusbat.log" ; MS_DataDir "e:\ms\data" ; ; define web site params ; ;http://userid:passwd@www.quotes-plus.com/dailyfiles/download.html ;http://www.quotes-plus.com/dailyfiles/05081997.qpl ; userid "Put_Your_Userid_Here" Quotes Plus Web Page Userid passwd "Put_Your_Passwd_Here" Quotes Plus Web Page Password webHost "www.quotes-plus.com" webPath "/dailyfiles" ; END_POINTERS: ; ;---------------------------------------------------- SCANS: ; ; define the scans to be performed ; ; Format: scan_name input_file output_file ; DNS_6 bbb dns_6 DNS_7 dns_6 dns_7 ; END_SCANS: ; ;------------------------------------------------------ COPY: ; ; define files to copy into MetaStock format ; ; Format: target_directory list_file ; current current watch watch ;open open ;indicies indexes ; END_COPY: ; ;------------------------------------------------------ ARCHIVE: ; END_ARCHIVE:
XXXXXXXXXXXXXXXXXXX WINBATCH FILE XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
; ; QPDAY.wbt - Automatically perform routine QuotesPlus functions ; original concept by Paul Beattie. ; heavily modified by Jeff Grover (1 Sept 1997) ; ; Event Sequence: ; ; 1) Download EOD Data from Web Site ; 2) QP Update database ; 3) QP Run scans ; 4) Archive Scan and List results for future back testing ; 5) QP Output Metastock files ; Files are output in full because the ; Automatic update feature of QP doesn't transfer ; splits properly to existing Metastock files. ; ; NOTE: (I changed this to update. NEED TO FIX ASAP!) ; ; Instructions: The following variables listed below must all be defined ; properly for the script to work. ;
;============================================================================
;debug(@ON) ; Un Comment this line to turn on debugger gosub SetupDateFiles
; setup information from spec file ;
specs = FileOpen("qpday_spec1.txt","read") while @TRUE in_line = FileRead(specs) If (in_line == "*EOF*") || (in_line == "POINTERS:") then Break endwhile while @TRUE ; Loop till break do us end in_line = FileRead(specs) If (in_line == "*EOF*") || (in_line == "END_POINTERS:") Then Break If StrSub(in_line,1,1) != ";" variable = ItemExtract (1, in_line, @TAB) value = ItemExtract (2, in_line, @TAB) %variable% = %value% endif endwhile FileClose(specs) maxConnectAttempts =100 ; Set the Maximum # of Tries to fetch EOD Data ; status = "startup" code = 0
;============================================================================
; Include any extra modules we need.
AddExtender ("WWW9532I.DLL") ; Winsock Extenders AddExtender ("wwwsk32i.dll") ;
;============================================================================
;;;;; ;;;;;;;;;;;; This Example ;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;; Drawing the Main Box ;;;;;;;;
;;;;;;;; Assorted Colors ;;;;;;;;; DKBLUE="0,0,128" BLUE="0,0,255" LTGRAY="192,192,192" GRAY="128,128,128" DKGRAY="64,64,64" GREEN="0,255,0" RED="255,0,0" BLACK="0,0,0" WHITE="255,255,255" YELLOW="255,255,0"
;;;;; Generic code for drawing a box and adding text to it.
;Get title on screen ;wbid = 99 ;BoxNew(wbid,rectTitle,1) ;BoxColor(wbid,BLACK,0) ;BoxDrawRect(wbid,"0,0,1000,1000",2) ;BoxTextFont(wbid,"Arial",TitleHeight,170,0) ; san-srif, ariel, size 20, bold, noitalic ;BoxTextColor(wbid,RED) ;BoxDrawText(wbid,rectTitleText,"Acme Aardvarks",0,32)
;; Note the use of while 1. This use of while maintains ;; the boxes until a user clicks on a button and exits ;; the while construction BoxesUp("100,100,600,600",@NORMAL)
while 1
BoxColor(1,"0,0,128",4) BoxCaption(1,"Quote Plus Utilities") ;; Note: Here we specify 8 buttons numbered 1 to 8. ;; You can change this. Edit the list of buttons here, ;; go to the "Select a button" routine and add or subtract ;; your button selection information. Then create a subroutine ;; at the end of this script to do what you need done when ;; the button is pushed. There is a sample for you to use. bExit=1 bHelp=2 bGet=3 bScan=4 bCopy=5 bArch=6 bUpdate=7 bText=8 bDoAll=9 bRevD=10
BoxDrawRect(1,"0,0,1000,1000",2)
BoxTextFont(1,"Times",150,80,0|0) BoxTextColor(1,"255,255,0") ; BoxDrawText(1,"325,550,1000,1000","Invester Control Center",0,0);;;
;;;;; This section creates the fancy banner headline in a box rectNote="100,30,900,270" NoteHeight=400 rectNoteText="70,200,950,800" rectnoteline1="0,0,1000,0" rectNoteline2="1000,1000,1000,0" rectNoteLine3="0,1000,1000,1000" rectNoteLine4="0,0,0,1000" notepenwidth=20 rectnoteline1b="40,150,960,150" rectNoteline2b="960,840,960,150" rectNoteLine3b="40,840,960,840" rectNoteLine4b="40,150,40,840" notepenwidthb=10 wbid=2 Thermid=3 Noteid=4 BoxNew(Noteid,rectNote,1) BoxColor(Noteid,LTGRAY,0) ; Light Gray no gradient BoxDrawRect(Noteid,"",2) ;;;;; --------- This line changes the headline font ----------------- BoxTextFont(Noteid,"Arial",NoteHeight,170,0) BoxTextColor(Noteid,RED) BoxPen(Noteid,WHITE,notepenwidth) boxdrawline(Noteid,rectNoteLine1) boxdrawline(Noteid,rectNoteLine4) BoxPen(Noteid,GRAY,notepenwidth) boxdrawline(Noteid,rectNoteLine2) boxdrawline(Noteid,rectNoteLine3) BoxPen(Noteid,WHITE,notepenwidthb) boxdrawline(Noteid,rectNoteLine2b) boxdrawline(Noteid,rectNoteLine3b) BoxPen(Noteid,GRAY,notepenwidthb) boxdrawline(Noteid,rectNoteLine1b) boxdrawline(Noteid,rectNoteLine4b) ;BoxDataTag(Noteid,"NOTE")
; BoxDataClear(NoteId,"NOTE")
;;;;; ----------- The BoxDrawText line creates the headline text. Copy (don't move) ;;;;; this line anywhere in this script you need to change the headline text.
BoxDrawText(Noteid,rectNoteText,"Quote Plus Utilities",1,4)
BoxButtonDraw(1,bGet, "&Get Data", "50,320,250,390") BoxButtonDraw(1,bRevD, "&Dates", "750,320,950,390") BoxButtonDraw(1,bUpdate,"&Updt QP", "50,410,250,480") BoxButtonDraw(1,bScan, "&Run Scans", "50,500,250,570") BoxButtonDraw(1,bArch, "&Arc Lists", "50,590,250,660") BoxButtonDraw(1,bCopy, "&DB Copy", "50,680,250,750") BoxButtonDraw(1,bText, "&View Log", "50,770,250,840") BoxButtonDraw(1,bDoAll, "&Do All", "50,860,250,930") BoxButtonDraw(1,bHelp, "&Help", "550,860,700,930") BoxButtonDraw(1,bExit, "E&xit", "750,860,900,930")
BoxTextFont(1,"Arial",45,0,0)
DOW = (TimeJulianDay("%TodayYear%:%TodayMonth%:%TodayDay%") + 5 ) mod 7 + 1 day=day_%DOW% BoxDrawText(1, "320,320,500,390", "Date : %day% (%TodayMonth%/%TodayDay%)", 0, 0)
DOW = (TimeJulianDay("%LastYear%:%LastMonth%:%LastDay%") + 5 ) mod 7 + 1 day=day_%DOW% BoxDrawText(1, "320,410,500,480", "Updated : %day% (%LastMonth%/%LastDay%)", 0, 0)
BoxDrawText(1, "320,500,500,570", "Scans :", 0, 0) BoxDrawText(1, "320,590,500,660", "Archives :", 0, 0)
if (code == 0 ) then status="Start-up Initialization Complete" if (code == 1 ) then status="qplus DATABASE UPDATED" if (code == 4 ) then status="NO database UPDATE required" if (code == 2 ) then status="qplus SCANS COMPLETED" if (code == 3 ) then status="mswin FILES COPIED" if (code == 999) then status="some kind of ERROR occured" if (code == 404) then status="file NOT READY for download" if (code == 200) then status="files DOWNLOADED successfully"
BoxDrawText(1, "320,680,500,750", "Status : %status%", 0, 0)
iBox=0 BoxButtonWait() while iBox==0 for x=1 to 10 if BoxButtonStat(1,x) then iBox=x next end while
;;; Select a button ;;;;
if iBox BoxDataClear(1,"TOP") switch iBox case bGet gosub GetQuotes break case bUpdate gosub QP_Update break case bRevD code=RunWait("C:\WINDOWS\NOTEPAD.EXE","dates to get.lst") comment="RC=%code% %qpListArchPath%\ibd\ibd_dates to get.lst edited! " GoSub AddMessageToLog code=0 break case bScan gosub QP_Run_scans break case bArch gosub archQpLists break case bCopy gosub QP_Copy_files break case bDoAll gosub GetQuotes gosub QP_Update gosub QP_Run_scans gosub archQpLists gosub QP_Copy_files break case bExit exit break end switch endif end while exit ;;;;; |