I'm looking for example of how to use Request-Download?
[1/2] 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]
]
[2/2] from: arolls:idatam:au at: 26-Oct-2001 11:20
img: load request-download
http://anton.idatam.com.au/rebol/anim/images/Dilbert4-01.jpg
view layout [image img]
Anton.