Multi download file

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Multi download file

Post by boysky76 » Thu Dec 12, 2013 9:30 am

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. ;)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Multi download file

Post by Mark » Thu Dec 12, 2013 8:31 pm

Hi,

Yes, you can do this.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Multi download file

Post by boysky76 » Thu Dec 12, 2013 10:27 pm

You can give me some most advise. . To manage downloads using liburldownloadtofile always ..?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Multi download file

Post by Klaus » Thu Dec 12, 2013 10:31 pm

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)

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Multi download file

Post by Mark » Thu Dec 12, 2013 11:29 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Multi download file

Post by boysky76 » Thu Dec 12, 2013 11:36 pm

Hi,

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Multi download file

Post by Mark » Thu Dec 12, 2013 11:43 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

boysky76
Posts: 48
Joined: Tue Aug 13, 2013 9:49 am

Re: Multi download file

Post by boysky76 » Fri Dec 13, 2013 12:00 am

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.

Post Reply