load, url and repeat

Ludovic Thébault ludovic.thebault at laposte.net
Sat Jan 3 10:42:20 EST 2004


Hello and happy new year !

How use the url command in a loop ?

I want to get a lot of web page which an url like this :
http://domain.com/page.php?ID=88

I just need to change the number of ID to get all pages.

But it's seem that the loop is too fast to get the info, even with a 
"load" command.

I try with this script :

on mouseup
repeat with n=1 to 810
    put "http://domain.com/page.php?ID="&n into turl
    load url turl
    put n&&the urlstatus of turl&cr after msg
    if the urlstatus of turl = "cached" then downloadcomplete
end repeat 
end mouseup


  on downloadcomplete
   -- do my stuff
    unload url turl
  end downloadcomplete

How do my stuff after the url is really cached ?

Thanks


More information about the use-livecode mailing list