I was able to access the download stack and got its script see below:
Several things I didn't get
1) I couldn't find the local of the Download Sack all. I can do is open it.
. .it doesn't appear as a substack of anything. Where is it?
2) In the script below, How is the upDateMe function monitoring the loading
process? As far as I can tell it makes the assumption that the download
should be over in 1 second, and then it simple checks, one time only, the
urlstatus.
send "updateme" && quote & href & quote to me in 1 second
but for a movie that might take 50 seconds to download. . .what is a
standard code chunk to use to check?
3) can someone give an example of
load url "href" with message
where the message sends a show command to a hidden button. . .this would
clue me in on how this works.
4) is there a way for us to allow the user to save cached data from the load
to his hard drive? be it some HTML file, movie or sound? so that in the
future they wouldn't have to download it over the net?
on updateme href
local stat, nk
if cancelled then
unload url href
close me
exit to MetaCard
end if
put urlStatus(href) into stat
if stat contains "error" or stat contains "not found" then
close me
answer "Error downloading URL" && href & cr \
& "Check network connection and proxy setup in Preferences."
unload url href
exit to MetaCard
end if
if stat contains "cached" then
put "Done" into field "progress"
set the thumbpos of sb 1 to the endValue of sb 1
wait 500 milliseconds
close me
if word 1 of url href is "#!/bin/sh"
then go url href
else answer "URL" && href && "is not a stack."
unload url href
exit to MetaCard
end if
if item 1 of stat is "loading" then
put item 2 of stat div 1024 into nk
put nk & "K/" & item 3 of stat div 1024 & "K "\
& nk * 10 div (the long seconds - stime) / 10 & "K/sec" into field
"progress"
set the endValue of sb 1 to item 3 of stat
set the thumbpos of sb 1 to item 2 of stat
end if
send "updateme" && quote & href & quote to me in 500 milliseconds
end updateme
on preOpenStack
local fwidth
put the formattedWidth of field "url" into fwidth
set the width of field "url" to fwidth
set the width of sb 1 to fwidth - 16
set the width of me to the right of field "url" + 8
end preOpenStack
on downloadNgo href
put false into cancelled
load href
put "Loading url" && href into field "url"
put empty into field "progress"
set the thumbPos of sb 1 to 0
send "updateme" && quote & href & quote to me in 1 second
put the long seconds into stime
modal me
end downloadNgo
Thanks!
Hinduism Today
Sivakatirswami
Editor's Assistant/Production Manager
www.HinduismToday.com
[EMAIL PROTECTED]
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.