Automater/Applescript page viewer/downloader loop I have some 9500 individual audio files I am trying to download which:

a) require a login to a website 
b) are located at subdirectories which ?redirects? to a download link

(eg. www.whatever.com/product/download/id/1234
==>
prompt to download the whatever-file-name.mp3)

Can someone help me write a applescript/automator app that will visit
"http://www.blah.com/product/download/id/1"
wait until download finishes,
+1
then visit:
http://www.blah.com/product/download/id/2
loop until 9600
set theint to 1
set theurl to "http://blah.com/"

repeat until theint = 6
    tell application "Google Chrome"
        set URL of active tab of window 1 to theurl &amp; theint
        activate
    end tell
    set theint to theint + 1
    delay 5
end repeat


works fine so far..
need to change 5s delay to something like 'when download finishes'.. any help?