;; DL
;;
;; A script that uses Access! to scan the DLs in any forum on Compuserve.
;;
;; Format:  scripit dl keyword [age] [start_dl] [end_dl]
;;
;; e.g.     scripit dl scripit*
;; or       scripit dl scripit* 15 10 14
;;
;; Note:  all argument are optional except for the keyword.
;;
;; To use this script, switch to a CLI, then issue the command above.
;;
;; A Scripit script by Khalid Aldoseri.
;; Needs Scripit version 1.20 or above.

begin

select wait 50 ABORT            ;Set max wait time to 1 second.

select Access                   ;Get at Access's screen
screen front                    ;Bring it to the front
window activate                 ;Activate it            

#dl    = 1                      ;Default start dl
#maxdl = 16                     ;Default end dl

if #argcount >= 3               ;Did user supply a start dl #
#dl = #arg[3]                   ;Yes, store it in #dl
endif

if #argcount >= 4               ;Did user supply an end dl #
#maxdl = #arg[4]                ;Yes, store it in #maxdl
endif

while #dl <= #maxdl             ;Loop from #dl to #maxdl

key "dl" #dl "\ns key:" $arg[1] ;Send commands to Compuserve
;                               ;to change dl and scan it
if #arg[2] > 0                  ;Did user supply the file age?
key " age:" #arg[2]             ;Yes, send the age:xx keyword
endif

key "\n"                        ;send a return

#dl = #dl + 1                   ;increment the dl number

endwhile                        ;end loop

end
