Download queue with libURL

Terry Vogelaar tvogelaar at de-mare.nl
Mon May 31 07:28:45 EDT 2010


I can't figure out what is wrong with this script:

on wachtrij
    global kjoejoe
    if line 1 of kjoejoe <> "" then
       put line 1 of kjoejoe && the number of lines of kjoejoe
       set the itemdel to tab
       switch item 1 of line 1 of kjoejoe
          case "up"
             libURLftpUploadFile item 2 of line 1 of kjoejoe, item 3  
of line 1 of kjoejoe, "wachtrij"
             break
          case "down"
             libURLDownloadToFile item 2 of line 1 of kjoejoe, item 3  
of line 1 of kjoejoe, "wachtrij"
       end switch
       delete line 1 of kjoejoe
    end if
end wachtrij


The global variable 'kjoejoe' contains the prober data, because the  
first line gets processed as expected. But then, after  
libURLDownloadToFile or libURLftpUploadFile is done, it should call  
this command again until kjoejoe is empty. And that isn't happening.  
Why not?

Terry


More information about the use-livecode mailing list