Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting several files from Web
#1
Hi,

Recently, I learned here how to get a file from internet and rename it with the current data in my PC.

I'm using the follow link:

Code:
Copy      Help
;allow single instance
if(getopt(nthreads)>1) end "The thread is already running. You can end it in the 'Running items' pane."

str sf sd ;;variables

;download image data into variable sd
int downloaded
rep 60 ;;repeat max 10 minutes every 10 s until success
,IntGetFile "http://image.weather.com/images/maps/forecast/precfcst_600x405.jpg" sd
,err 10; continue ;;if error, retry after 10 s
,downloaded=1
,break
if(!downloaded) end "failed to download"

;format filename and save to file
sf.timeformat("$my qm$\Image-{yyyy-MM-dd}.jpg")
sd.setfile(sf)

run sf ;;open the image. Delete this line if don't need.



However, now I'm trying to do the same macro for 87 links...and it's getting very tiring, because i have to make 87 macros.


So, How can i make it in a single macro ? I mean...I'd like to list all the links in the same macro.


Again, thanks a lot for helping.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)