Page 1 of 1

Multi download file

Posted: Thu Dec 12, 2013 9:30 am
by boysky76
Hi people,

I wanted to know if it was possible with LiveCode manage multiple downloads at the same time, in practice I would like to create a multidownload manager like jdownloader or Mipony something simple to start and I wanted to understand if LiveCode could handle something like this.

Thanks to all those who respond. ;)

Re: Multi download file

Posted: Thu Dec 12, 2013 8:31 pm
by Mark
Hi,

Yes, you can do this.

Kind regards,

Mark

Re: Multi download file

Posted: Thu Dec 12, 2013 10:27 pm
by boysky76
You can give me some most advise. . To manage downloads using liburldownloadtofile always ..?

Re: Multi download file

Posted: Thu Dec 12, 2013 10:31 pm
by Klaus
Hi boysky76,
boysky76 wrote:To manage downloads using liburldownloadtofile always ..?
yes, because that is NON blocking like other calls and this does not "eat" too much RAM
because the urls are not cached but directly written to file.

And it can be "monitored", which is of course essential for progress bars etc.!

Best

Klaus

@Mark
Good one, I was also tempted... 8)

Re: Multi download file

Posted: Thu Dec 12, 2013 11:29 pm
by Mark
Hi,

Klaus and you are right, libUrlDownloadToFile is the way to go.

You might want to tell us a little more about what you want to do. E.g. I made an FTP client a long time ago, which very nicely downloaded multiple files simultaneously, until an update of Revolution broke it and I couldn't bother to fix it.

Do you want to download very big files? Why would you do something like that, if there are already downloaders for this purpose? Do you need a solution for a special purpose, to build into your own software? If could tell what you want to do differently, we might give you some good advice.

Kind regards,

Mark

Re: Multi download file

Posted: Thu Dec 12, 2013 11:36 pm
by boysky76
Hi,

Thanks for the reply boys, one other thing .. and can also handle pause and resume downloads? If yes, what commands I manage this?

Re: Multi download file

Posted: Thu Dec 12, 2013 11:43 pm
by Mark
Hi,

AFAIK pause and resume commands are not included in LiveCode. You'd have to write your own scripts to do that. It should be relatively easy to do this with FTP servers, but it might be difficult to do this with HTTP servers.

Kind regards,

Mark

Re: Multi download file

Posted: Fri Dec 13, 2013 12:00 am
by boysky76
Hi,

I certainly know that there are many software that already manage downloads, but I wanted to make one to learn how to handle this, large and small files, with the files in the download queue, while 5 or 6 will discharge and other depart in followed.