Samurize Scripts

Originally posted by Andy C

screen06.jpg


Nice setup Andy - I only just discovered this thread (and Samurize) yesterday, and am having fun plagiarising the look of your setup, although I am starting from scratch to learn how to use it properly.

My only problem is with the WeatherPlus. I've got it working fine, but what's the point if the forecast is soooo innacurate? Heavy rain on Wednesday? Not according to the Met Office or BBC Weather sites...

So, to resolve this problem, I've knocked up a quick alternative which parses the BBC weather site pages (like this very sunny one for Farnborough):

http://www.bbc.co.uk/weather/5day.shtml?id=2045&links

to give:

bbc_weather.jpg


It gives access to every item on the BBC weather page, including Max/Min temps, humidity, air pollution and sun indices, wind speed and sunrise/sunset times.

Anyway - link to the script is here

There's a load of text at the start of the script to explain what you need to do, but post here or drop me an email if you have any questions. I've not had chance to do comprehensive testing on it, but it's worked OK on every location I've tried.

It doesn't enable you do display graphics for each day's weather (yet) but I may add that later when I have the time. I presume that I would then have the same problem of having to restart the Samurize client to reload the graphics - yuk!

Anyway, hope this is useful to someone - any feedback gratefully received.
 
Originally posted by Rich_L
Right,

The 2 temperatures that are shown are the High/Low forecast ie so you can expect the temperature to be somewhere in between.

[/code]

ahhh, the temps are max/min, that makes perfect sense now :)

Selekt0r - I'll give your script a go later. Where do I obtain the location codes for it ??
 
Selekt0r - that looks cool, trying to use it in mine, but having trouble of getting an active script to work. I has generated a temp file, change the location to 1222 (Brighton) and the path is correct, can you give me a pointer?

msn is in sig, thanks!

I am almost there, just need a small nudge!
 
All you need to do to get the location is to use the search facility on the BBC weather site (http://www.bbc.co.uk/weather/ - look under '5 Day Forecast'. Search for the location you need and then just copy the URL into the script.

Raymond Lin - if it's created the bbcweather.tmp file then you look to have called the writefile_weather function correctly. All you need to do now is to add some meters which call then ret_weather function and pass a w_object parameter (click on 'Change Parameters...' in Samurize config). The w_objects are listed in the script file. Make sure you include the colon after the w_object, as this is required.

The Parameters box in Samurize config should show something like:

w_object: LOCATION:

I don't use MSN, but feel free to drop me an email or post again if you have any probs getting it working.
 
Nice work selekt0r, that's a BIG improvement! :)

The only thing needed is to edit the script slightly so that it doesn't display a leading ':' on the output. For example:

MAXTMP1 returns ":21 C", rather than just "21 C"
CONDITIONS1 returns ":Sunny", rather than just "Sunny"

and so on.

I so wish I could code VB Script! LOL. :)

[Edit: Oops, my bad... I forgot the : on the object names. I was using MAXTMP1, not MAXTMP1: :)]


Andy.
 
Last edited:
Selekt0r,

Muchos thanks for that BBC script, Id much rather pull the weather of there than some other funny site :)

Im searching for a SETI.png icon to go with my SETI progress info etc but no joy, so if anyone find one let me know please!!

Cheers
Rich
 
Originally posted by Andy C
The only thing needed is to edit the script slightly so that it doesn't display a leading ':' on the output. For example:

MAXTMP1 returns ":21 C", rather than just "21 C"
CONDITIONS1 returns ":Sunny", rather than just "Sunny"

Have you sorted this? It doesn't do that on my setup.
 
Originally posted by Rich_L
Im searching for a SETI.png icon to go with my SETI progress info etc but no joy, so if anyone find one let me know please!!
Rich

Just goto the SETI site, grab a logo and convert to PNG
 
Originally posted by Selekt0r
Have you sorted this? It doesn't do that on my setup.
Yes thanks... I didn't put the ':' on the end of the object names... so I was using MAXTMP1, MINTMP1 etc instead of MAXTMP1: and MINTMP1: - Oops! :)

What I'd like to do now is strip the county from the location, so I'd just have "Farnborough" instead of "Farnborough, Hampshire". I tried extending the line in the script like so...

Code:
html=replace(html,"<td colspan=""6""><font face=""Verdana, Arial, Helvetica, sans-serif"" size=""2""><b>","LOCATION:",", Hampshire")
...but obviously it's not as simple as that as it doesn't work. Any idea on how I can do that (unless it's a pain in the butt)?

Thanks a lot....
 
Last edited:
Originally posted by Andy C
What I'd like to do now is strip the county from the location, so I'd just have "Farnborough" instead of "Farnborough, Hampshire". I tried extending the line in the script like so...

Oh, go on then.....

If you re-download the script you'll see that I've added another variable 'display_county'. Set that to N and your county will magically disappear :)
 
Originally posted by Selekt0r
Oh, go on then.....

If you re-download the script you'll see that I've added another variable 'display_county'. Set that to N and your county will magically disappear :)
LOL, that was quick.. muchos gracias. :)
Fussy I know, but my box isn't big enough to get the county in also! Hehe.


Andy.
 
Originally posted by Sundance Kid
Just goto the SETI site, grab a logo and convert to PNG

LOL, ok maybe I should have been a bit more specific

A Seti logo in the same style as the others :)

ps heres my desktop now,

mynewdesktop.jpg


Pretty similiar to MTA99, except Ive added a SETI info bit, and some more CPU info etc
 
Last edited:
Back
Top Bottom