Ron,
Here's some code that will drive a progress bar and put some text
underneath like "2 minutes 28 seconds remaining @ 135 KB/sec":
http://revcoders.org/calctimeremaining/
On Oct 28, 2009, at 5:58 PM, Ron wrote:
Thank you Alex,
No one had replied yet so I kept looking. I found some similar code
in a project from someone else and realized they were using
libURLSetStatusCallback so once I found that, I could do the coding
myself. The pdf docs certainly give the impression that
libURLDownloadToFile is sufficient without the
libURLSetStatusCallback but with this, I am getting the update I
need and can set the progress bar etc.
Thanks again for the reply,
Ron
On Oct 29, 2009, at 3:55 AM, Alex Tweedly wrote:
I haven't noticed a reply to this .... if there was one and I just
missed it, then I offer my apologies (especially if i contradict
that answer ;-)
I haven't look at the user guide - this is info from the
documentation (dictionary).
The last parameter to libURLDownloadToFile is a status callback
called only when the operation is complete (whether it succeeds or
fails). To get a periodic status callback, you need to call
libURLSetStatusCallback - see the dictionary entry for it and for
libURLDownloadToFile
-- Alex
ron barber wrote:
Greetings,
I am downloading a file from the web to my HD using
libURLDownloadToFile. I copied the scripts in Rev's user guide which
also says:
"As the URLStatus changes periodically throughout the download
process, the button's
showStatus handler is executed repeatedly. Each time a showStatus
message is sent, the
handler places the new status in a field. The user can check this
field at any time during
the file transfer to see whether the download has started, how
much of
the file has been
transferred, and whether there has been an error. "
This sounds like the showstatus message is sent without any further
coding from me but I am not getting any intermediate messages,
simply
'downloaded' at the end of the download. I've tried 'sending' and
'repeating' but I'm missing something.
My script (basically copied from the guide)
on mouseUp
put specialFolderPath("desktop")&"/newfile.zip" into newfile
set the fileType to "????zip "
--set the fileType to "ddskdevi"
libURLDownloadToFile myfile,newfile,"showStatus"
end mouseUp
on showStatus theURL
put the URLStatus of theURL into field "status"
end showStatus
Thanks,
Ron
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution