Jump to content

[release]xml Desktop Weather


Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Originally posted by dreamz@Oct 16 2003, 03:47 AM

for getcachefile, what do we put for fileurl 1 and 2?

Are you referring to these lines?

file1 = getCacheFile(mins, x30minURL, x30minFile)

file2 = getCacheFile(mins, x120minURL, x120minFile)

mins is set before these lines in getCacheFiles()

x30minFile and x120minFile are defined at the beginning of the script

Also, I have contacted Badboy and given him the following function to allow retrieval of the users loc_id without intervention.

Function FindLocationID(CityName)
GetURL = "http://xoap.weather.com/search/search?where=" & CityName
Dim Http
Dim thexml,thelist,thehandle,numitems,thetext
Set Http = CreateObject("Microsoft.XMLhttp")
Http.Open "GET",GetURL,False
thetext = Http.ResponseText
Set Http = Nothing
Set thexml = CreateObject("Microsoft.XMLDOM")
thexml.async = False
If thexml.parseError.errorCode <> 0 Then
 FindLocationID = "Weather.com Data UNAVAILABLE"
 Exit Function
End If
Set thelist = thexml.getElementsByTagName("loc")
numitems = thelist.length
If numitems > 1 Then
  For i = 0 to (numitems - 1)
    Set thehandle = thelist.item(i)
    If thehandle.text = CityName Then
      FindLocationID = thehandle.getattribute("id")
      Exit Function
    End If
  Set thehandle = thelist.item(numitems - 1)
  FindLocationID = thehandle.getattribute("id")
End If
End Function

The above function returns the loc_id which matches the City, Country or ZIP code that has been entered.

I got this function from the Weather 2003 Pro script on samurize.com and made a few adjustments to it. I take no credit for the original script.

Link to post

yeah, i just tried getcachefiles and it works. just like the original desktop weather script, i guess. thanks for the help, guys! :woot:

edit: just wondering, what are the performance differences between the xml and the normal version? i know idicula said it updates faster, but anything else? is this xml version better because it's unaffected by site changes? all these ****ie questions... :shy:

Link to post
Originally posted by jumpers@Oct 16 2003, 06:26 AM

nice, but how we can make it look nice like the another version? ( i mean like original konfabulator weather)


If you mean something like this (using XML with localized days)

then just edit config file and replace images with old ones...


Link to post
Originally posted by crni@Oct 16 2003, 12:19 PM

If you mean something like this (using XML with localized days)

then just edit config file and replace images with old ones...

yeah, i'd like to use the old images too. don't we need to edit the script also? and can we change the main image? i.e. copy and paste it to the folder and rename tempmain or whatever to now.png? and do that for all the images? what did you do exactly? sorry for all the questions.

Link to post

thanks, but i still can't get it right.

i've set up my own config and added the script and all the meters i wanted.

to add the images, i go to add draw object > 32 bit png, then i go into the desktopweatherxml folder, go into the temp folder, then add now.png and day 1.png. if i try to load the images from the other desktop weather script, i can get the weather images to appear, but they won't update (naturally, since i'm not using that script).

Link to post
Did you rename the icons and do you have them in the 2 different sizes in their respective directories? The original Desktop Weather had names for the icons like mostlycloudy.png and heavyrain.png, and they were only one size, whereas the XML version uses the original numbers - 16.png, 35.png, etc.. with 2 different sizes, 128x128 and 32x32.

this was something i had asked about in this forum:


basically, if you want 'mostlysunny' icon from the original set, you would find the one(s) that match mostlysunny in the XML version 128x128 folder. Rename the original set one to that number and then copy it into the 128 folder, overwriting the one there. (I had to do some editing of those original icons in photoshop to bring them to 128x128... they didn't work otherwise?)

Link to post

For the xml desktop weather, i followed the instruction, when I click http://xoap.weather.com/search/search?where=XXXXX, but I get :

<?xml version="1.0" encoding="ISO-8859-1" ?>

- <!-- This document is intended only for use by authorized licensees of The Weather Channel. Unauthorized use is prohibited. Copyright 1995-2002, The Weather Channel Enterprises, Inc. All Rights Reserved.


Then I went to get registered at weather.com, but still don't konw how to obtain my loc id :nuts: .

Any help is appreciated, thanks in advance.

Link to post

To all those wantiong to use the old images, get the latest version (DesktopWeatherXML 1.1). This version will let you choose which images you want by altering one constant.

const IMAGES = "old"   ' Set this to which images you would like to use (VALUES = [ new or old ]).

new = The Weather Channel® images

old = Konfabulator images

Can also be used to add other images that you have, as long as they are named correctly (0.png, 1.png, 2.png, ... , 47.png, na.png).

Link to post

Thank you TYT, now I got my loc id:

City, CA (91***)

Then I put my zip to "const LOCID = "91***" ' Set this to your "loc id" from the above ", (I suppose that my zip is my locid,) but still got N/A or not yet executed on every part.

Yet, I got nothing under the select function pull down menu in Config.

Link to post

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...