URL download and Cache problems
harrison at all-auctions.com
Wed Dec 15 11:28:44 CST 2004
I'm getting some Revolution weirdness when trying to download
files from the internet.
put "" into field "CachedURLSListField1" of card 1
put "" into field "ClearedCacheList1" of card 1
put 1 into N2
repeat while N2 < 4
load URL field "JPEGURL" of card 1 with message "downloadComplete"
--(Which sends this message to the stack which I handle by updating a
field with "Status - Download completed")
export image "JpegImage" of card 2 to file field "ImageFileName1" of
card 1 as JPEG -- Gets entire image
put field "CachedURLSListField1" of card 1 & the cachedURLs into
field "CachedURLSListField1" of card 1
--to list what files are in my cache
--then I supposedly delete the cache with
unload URL field "JPEGURL" of card 1
--and to check if the file was deleted out of the cache
put field "ClearedCacheList1" of card 1 & the cachedURLs into field
"ClearedCacheList1" of card 1
add 1 to N2
The problems I'm running into are the following:
1. The program doesn't wait until the first download is complete
before moving on to the second download.
2. The cache isn't getting cleared
3. It's like Revolution is executing just too fast.
If I simply put
answer "N2 = " & N2
-- before the end repeat everything downloads - but unfortunately,
-- I have to be around to press the stupid button everytime to
-- let the program move on, and I don't want to have to do that.
Any ideas as to what is going on, and as to what I need to do to fix
Thanks in advance.
More information about the use-livecode