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

[REBOL] Re: A question in time saves... Clouds???

From: jimbo:sc:starcat:ne:jp at: 5-Jun-2001 19:51

Carl Read wrote:
> Hi Jim, > > I see while I've been writing this that Graham's given you a function > to wait on a time, but perhaps some of the following will still be of > use to you... > > On 05-Jun-01, Jimbo wrote: > >> Hi again, > >> It's the Happy Hippy back with another question. > >> Please forgive my repeated intrusions. O :-) > > Heh - you're the silver-lining, man. (:
Hey, Cool! Thanks that makes me feel good. Thanks!
> >> I'm still working on the same automated cloud catcher. >> I've expanded it (cut & paste) to grab all nine sections >> needed for the cloud cover of the /entire/ earth which >> was my original goal. Everything is working OK except >> that the time required to do the nine grabs varries >> from set to set. So I got looking into it and it apears >> as if I can use the "WAIT" command with a block of times >> in brackets. I wonder... Is this true? If so what would >> it be formatted like? I feel pretty silly here, not even >> knowing basic REBOL syntax :-/ > >> Ummm... > >> wait [time1, time2 time3, >> time4, time5, time6] > >> ??? > > Apart from the commas (not needed in REBOL) the syntax is fine,...
Ah! Ha! Got it... ummm.. Maybe.. O :-) REBOL [] if not exists? %pictures/ [ make-dir %pictures/ ] forever [ page: read URL !!! parse page [thru "SRC=^"/" copy pic-path to "^" WIDTH" to end] write/binary join %pictures/ to-file last parse pic-path "/" read/binary join to-url pic-path wait [12:00 12:30 13:00 13:30 14:00 14:30 15:00 15:30 16:00 16:30 17:00 17:30 18:00 18:30 19:00 19:30 20:00 20:30 21:00 21:30 22:00 23:30 00:00 00:30 01:00] ] Oh no wait... I forget! Can ya put a data block inside a function command like "forever[]" ???
> except > it still won't work. (How you use a block with 'wait I'm not sure - > can't find much in the manuals on 'wait...) But read on...
Mmmm Ya... Me too. I looked and found where it said you could do it but there was no example code so I flew back here. I've read some more while waiting but I think that has actually confussed me even more; a task easily accomplished! X^/
> As I see it, there's two ways to approach your problem. One would be > to write a bit of code to wait on times in a block, (as you'd hoped > 'wait could do and perhaps it can:), or use REBOL's 'modified? word > to check the URLs every ten minutes or so to see if the JPGs have > changed since you last downloaded them...
I don't know (of coarse! ;-) but I think that wouldn't work in my case because NASA is generateing the map names randomly per request but the actual map data is only updated every half hour at a quarter past and a quarter till.
> That doesn't wait for a certain time of day though, (others will have > to tell you how to do that), so you might have to always start your > script on the hour - till you work out how to create the 'times block > based on the time you run your script. (: > > Have fun.
Hehehe ... Yup! this is something I will run once for 2 or 3 days straight and then never look at again. Well I'm alot closer thanks to you and Graham Chu!!! -- Shisyo dono, domo arigato gozaimasu!!! James Dean Prentice III Just some old Hippy Hang'en out in Japan