Download queue with libURL

Terry Vogelaar tvogelaar at de-mare.nl
Tue Jun 1 05:26:50 EDT 2010


Hi Mark,

I'm afraid that is not true. I tried it without queue and it worked  
for very small files. If the file is small enough, the upload is done  
on time. Also, when debugging, the script is running slow enough to  
finish downloading. But when I'm just running it and it has to  
download a bunch of JPGs of 125kb each, I only have the last one. That  
was the only one that had enough time to finish.

So I apparently need this queue approach to solve this. And the  
variable contains the right data because it does the first one.  
However, it doesn't call the script like it should. No wachtrij  
message is sent.

I'm puzzled...

Terry

Op 31-mei-2010, om 19:00 heeft use-revolution-request at lists.runrev.com  
het volgende geschreven:

> Hi Terry,
>
> You don't need to do this. LibURL can do this by itself. Just issue
> the upload and download commands right-away.
>
> Does item 3 of line 1 of kjoejoe contain a file path? (It should).
>
> --
> Best regards,
>
> Mark Schonewille
>
> On 31 mei 2010, at 13:28, Terry Vogelaar wrote:
>
>> 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