Internet communication through a Firewall

Alejandro Tejada capellan2000 at yahoo.com
Sun Sep 26 14:20:31 EDT 2004


on Sun, 26 Sep 2004 
Klaus Major wrote:

> Buenos dias Alejandro,

Buenos Dias Klaus,

> It gets called from the menus with:
> 
> ...
> put "the complete url to the stack..." into href
> send "downloadNgo href" to stack "download stack"
> ...

Hmmm, interesting.

Is "the complete url to the stack..."
an http url or a ftp url?

I guess the following script is 
from the stack "download stack".
Right?


> #######
> local stime, cancelled
> 
> on mouseUp
>    if the short name of the target is "Cancel"
>    then put true into cancelled
> end mouseUp
> 
> 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"

Clever way to know is the file is a stack!

Could i read any custom property from
a remote stack in this way?

>      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
> ##########
> 
> Hope that helps...

Sure it does! :-)
Thank a lot for the insights,
Klaus,

al

=====
Visit my site:
http://www.geocities.com/capellan2000/


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


More information about the metacard mailing list