Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] I'm looking for example of how to use Request-Download?

From: bpaddock::csonline::net at: 25-Oct-2001 10:22

Can some one point me to a example of how to use the built in 'request-download' word?
>> source request-download
request-download: func [ {Request a file download from the net. Show progress. Return none on error.} url [url!] /to "Specify local file target." local-file [file! none!] /local prog lo stop data stat event-port event ][ view/new center-face lo: layout [ space 10x8 vh2 300 "Downloading File:" vtext bold center 300 to-string url prog: progress 300 across button 90 "Cancel" [stop: true] stat: text 160x24 middle ] stop: false data: read-thru/to/progress/update url local-file func [total bytes] [ prog/data: bytes / (max 1 total) stat/text: reform [bytes "bytes"] show [prog stat] not stop ] unview/only lo if not stop [data] ]