; send all the quicklook plots for a given day to the printer.
; specify date either as yy/mm/dd or yymmdd
;
;+
;
; NAME: 
;       QLPRINT
;
; PURPOSE:
;
;
; CATEGORY:
;       BATSE
;
; CALLING SEQUENCE:
;
;
; CALLS:
;	none
;
; INPUTS:
;       none explicit, only through commons;
;
; OPTIONAL INPUTS:
;	none
;
; OUTPUTS:
;       none explicit, only through commons;
;
; OPTIONAL OUTPUTS:
;	none
;
; KEYWORDS:
;	none
; COMMON BLOCKS:
;	none
;
; SIDE EFFECTS:
;	none
;
; RESTRICTIONS:
;	none
;
; PROCEDURE:
;	none
;
; MODIFICATION HISTORY:
;
;-
pro qlprint,date
!quiet = 1
;
; If user entered time with slashes instead of yymmdd, convert to file name 
slash = strpos (date, '/')
if slash ne -1 then begin
   parse_atime, date, year=year, month=month, day=day, /str, error=error
   if error then begin
      print,'Error in time specified.'
      goto,getout
   endif
   date= year + month + day 
endif
;
filedate = strmid(date,0,6)
filesearch = concat_dir((chklog('BATSE_QLOOK'))(0), filedate + '*.tek')

files = findfile (filesearch,count=count)
if count eq 0 then begin
   print,'No plot files found.'
   goto,getout
endif else begin
   for i=0,count-1 do begin
;      spawn,'print/setup=tek ' + files(i),result
;      print,result
print,files(i)
   endfor
endelse
;
getout:
return&end

