All of my skins I am developing now
RomanDA Need a little help?
Published on May 19, 2009 By Automan In DesktopX Tutorials

Hey;

Hope everyone is doing great!!!

I posted a link to an image of my 5 Day forcast and the way it's layout is. Image Below:

 

 

Hey ; I there guy we have typed in the past a lot on mods for Desktopx. Where you at on this one buddy?

I want to use the Weather XML but I don't or haven't had the time to look into all of the weather widgets for DesktopX and also the Objects for Forcasting in DesktopX.

I am trying to make my DesktopX Weather come out the same as i the screenshot link and can't seem to get the images to show or get it with in the same layout.

I always keep it on and it checks the weather XML every 30 mins. I am using Samurize to don this as the program had a Weather 2004.dll that makes it wasy to set-Up the 5Day forcast.

So can some one give me some help on the switch to DesktopX. When the Prometheus Dark DesktopX Pro Theme comes out I will give all of the weather related accomplishment CREDITS to who ever might help on this.

I hope some one can help as I don't want to pick someone elses weather Object or Widget apart and make it work with this theme.

Thanks

Automan


Comments (Page 1)
3 Pages1 2 3 
on May 20, 2009

i believe there are a few weather widgets over in the widgets forum, and if you take some time and look them over you should be able to see how they work, or do like most people do, and take one and just move the images around, and put some new text on them.

on Jun 01, 2009

Hi RomanDA;

I am trying to get help on building a weaher 5Day that will pull the XML file and save it to a Directory like my temp dir., then there is a section of the XML file that is advertizing from Weather.com, this XML area screws up the XML file so I have to get this build to either strip the section out of the XML file then read it after the fix.

I can look at the 5Day section of one of the widgets but the XML problem is still there.

Now if the reading of the XML file will over look the Advertizing section and pull the 1st dat Now and Later then it's a go.

I just can't seem to be able to get around the section I am refering to.

Any ideas on that?

that there guy for the reply, I would like to quit using the Samurize program all together and just use DesktopX for all of my weather.

Also take a look at my next post, there is something wrong with using the Internet ActiveX control thats with DesktopX that is showing a Border on the Right and Bottom of the Web Control item. I called Microsoft and they mentioned that DesktopX needs to be changed to handle this. So I am going to leave a message for the Support team to get them to take a look at this.

Thanks

Automan

on Jun 01, 2009

What XML file are you using? Where from? I think you should be able to parse out the unwanted info and then rewrite the file.

on Jun 01, 2009

 This is just a quickie file parser code. It'll retrieve the unwanted section, erase it, and rewrite the file.

Just put in your file path and section tags. You might want to test this on another xml file first, before you rewrite your actual xml file...just to see if it works.

Code: vbscript
  1. Dim xmlfile
  2. xmlfile = object.Directory & "hi.xml" '--YOUR XML FILE HERE
  3. 'Called when the script is executed
  4. Sub Object_OnScriptEnter
  5.  getcontent = readFile '--get xml contents
  6.  parsecontent = extractInfo(getcontent,"<to>","</to>"&vbcrlf) '--retrieve unwanted section
  7.  getcontent = replace(getcontent,parsecontent,"") '--erase unwanted section
  8.  writefile(getcontent)'--rewrite file
  9. End Sub
  10. 'Declare constants
  11. Const ForReading = 1, ForWriting = 2, ForAppending = 8
  12. 'Declare the file system object
  13. Dim fso, f, Msg
  14. Set fso = CreateObject("Scripting.FileSystemObject")
  15. Function readFile
  16.  'Check if file exists
  17.  If fso.FileExists(xmlfile) Then
  18.   Set f = fso.OpenTextfile(xmlfile, ForReading)
  19.   fileinfo = f.readall
  20.   f.Close
  21.  Else
  22.   msgbox "File does not exist"
  23.  End If
  24.  readFile = fileinfo
  25. End Function
  26. Sub writeFile(newcontent)
  27.  'Create a file and write some text
  28.  Set f = fso.OpenTextfile(xmlfile, ForWriting, True)
  29.  f.Write newcontent
  30.  'Properly close file
  31.  f.Close
  32. End Sub
  33. Function extractInfo(info, startStr, endStr)
  34.  iStart = instr(1, info, startStr)
  35.  iEnd = instr(iStart, info, endStr)
  36.  iEnd = iEnd + Len(endStr) '--include closing tag
  37.  iLength = iEnd - iStart
  38.  info2 = mid(info, iStart, iLength)
  39.  extractInfo = info2
  40. End Function

 

 

on Jun 04, 2009

Hi sViz;

Good to see you! Long time...

OK to the code andentered the correct directy and file nam to the section you pointed at and the code is as fillows.

1.Dim xmlfile
2.xmlfile = object.Directory & "C:\Users\Automan\AppData\Local\Temp\Weather.2004\Weather.Forecast.37932.English.5.Days.xml" '--YOUR XML FILE HERE
3.'Called when the script is executed
4.Sub Object_OnScriptEnter
5. getcontent = readFile '--get xml contents
6. parsecontent = extractInfo(getcontent,"<to>","</to>"&vbcrlf) '--retrieve unwanted section
7. getcontent = replace(getcontent,parsecontent,"") '--erase unwanted section
8. writefile(getcontent)'--rewrite file
9.End Sub
10.
11.'Declare constants
12.Const ForReading = 1, ForWriting = 2, ForAppending = 8
13.'Declare the file system object
14.Dim fso, f, Msg
15.Set fso = CreateObject("Scripting.FileSystemObject")
16.Function readFile
17. 'Check if file exists
18. If fso.FileExists(xmlfile) Then
19.  Set f = fso.OpenTextfile(xmlfile, ForReading)
20.  fileinfo = f.readall
21.  f.Close
22. Else
23.  msgbox "File does not exist"
24. End If
25. readFile = fileinfo
26.End Function
27.Sub writeFile(newcontent)
28. 'Create a file and write some text
29. Set f = fso.OpenTextfile(xmlfile, ForWriting, True)
30. f.Write newcontent
31. 'Properly close file
32. f.Close
33.End Sub
34.Function extractInfo(info, startStr, endStr)
35. iStart = instr(1, info, startStr)
36. iEnd = instr(iStart, info, endStr)
37. iEnd = iEnd + Len(endStr) '--include closing tag
38. iLength = iEnd - iStart
39. info2 = mid(info, iStart, iLength)
40. extractInfo = info2
41.End Function

Now when I try to save and apply the code I get an immediate errow on line 1--->

Expected statement
Line: 1
Code:
1.Dim xmlfile

Thats it.

Question? Is there a way to get code for an XML weather formation like the picture I have and just use DESKtopX to retreve the Weather data to a directory os choice then strip the bad stuff " Advertizing ", then set where the 42x42 Weather Images are at. the layout all the fields the same as the Samurize config, and just drop Samurize altogether and have the weather running with in the DesktopX Theme I have.

Reason for using only desktopX for the Weather XML and images and info placeed into the same position as I have in the image is that I want the weather to be DesktopX run Weather altogether so that I can release this theme and get permissions and give credits, ets,

This Desktop is aone of a kind not produces or even close to all the DesktopX themes I have seen, this is a real life desktop that have running weather radar using two or three HTML page whice I will make available, with docs.

Take a look at this screen shot and you wisee what I mean:

https://www.wincustomize.com/skins.aspx?skinid=24755&libid=13

The Today Weather at the top I can get working, if i have a script to get going on the 5Day with. I just create two objects and place the weather script to them and presto they are all done withDesktopX and not using another program.

But I do think you are very close in you code to picking out the downloaded XML file and getting rid of the AD section. That wat if Weather.com changes again it's just a matter of stripping some  more of the downloaded file again.

Thanks a Million, I willl try the code again after ya tell me what I probable did wrong on the script you wrote, just to pre check it.

Automan

on Jun 04, 2009

Now when I try to save and apply the code I get an immediate errow on line 1--->

You have to take out the numbers (1. 2. 3. etc) that get copied with the script. Don't know why the forums copy numbers with the script; kinda defeats the purpose.

Don't forget to change the XML tags in this line to the ones you're stripping out:

parsecontent = extractInfo(getcontent,"<to>","</to>"&vbcrlf) '--retrieve unwanted section

Here's the code again without those numbers:

 

Dim xmlfile
xmlfile = object.Directory & "hi.xml" '--YOUR XML FILE HERE

'Called when the script is executed
Sub Object_OnScriptEnter
 getcontent = readFile '--get xml contents
 parsecontent = extractInfo(getcontent,"<to>","</to>"&vbcrlf) '--retrieve unwanted section
 getcontent = replace(getcontent,parsecontent,"") '--erase unwanted section
 writefile(getcontent)'--rewrite file
End Sub

'Declare constants
Const ForReading = 1, ForWriting = 2, ForAppending = 8
'Declare the file system object
Dim fso, f, Msg
Set fso = CreateObject("Scripting.FileSystemObject")

Function readFile
 'Check if file exists
 If fso.FileExists(xmlfile) Then
  Set f = fso.OpenTextfile(xmlfile, ForReading)
  fileinfo = f.readall
  f.Close
 Else
  msgbox "File does not exist"
 End If
 readFile = fileinfo
End Function

Sub writeFile(newcontent)
 'Create a file and write some text
 Set f = fso.OpenTextfile(xmlfile, ForWriting, True)
 f.Write newcontent
 'Properly close file
 f.Close
End Sub

Function extractInfo(info, startStr, endStr)
 iStart = instr(1, info, startStr)
 iEnd = instr(iStart, info, endStr)
 iEnd = iEnd + Len(endStr) '--include closing tag
 iLength = iEnd - iStart
 info2 = mid(info, iStart, iLength)
 extractInfo = info2
End Function

 

 

Question? Is there a way to get code for an XML weather formation like the picture I have and just use DESKtopX to retreve the Weather data to a directory os choice then strip the bad stuff " Advertizing ", then set where the 42x42 Weather Images are at. the layout all the fields the same as the Samurize config, and just drop Samurize altogether and have the weather running with in the DesktopX Theme I have.

I'm inclined to say yes. If all the information present in the screenshot above is retreived from an XML file, you should be able to strip out the info you need and apply them to text objects or image objects. But without seeing the actual XML file you're using, I can only postulate on how to do that. If you can send or point me to an example XML file like the one you're using I might be able to tailor the code.

Here is the tutorial I read to get started on making rss readers -- LINK

on Jun 06, 2009

Hi sViz;

OK Tried the new code and get an error with DesktopX " Line 7 ) needed"?

Here is the XML file I use:

  <?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-2009, 
  -->
<!--
 The Weather Channel Interactive, Inc.  All Rights Reserved.            
  -->
- <weather ver="2.0">
- <head>
  <locale>en_US</locale>
  <form>MEDIUM</form>
  <ut>F</ut>
  <ud>mi</ud>
  <us>mph</us>
  <up>in</up>
  <ur>in</ur>
  </head>
- <loc id="37932">
  <dnam>Knoxville, TN (37932)</dnam>
  <tm>9:50 AM</tm>
  <lat>35.92</lat>
  <lon>-84.17</lon>
  <sunr>6:20 AM</sunr>
  <suns>8:51 PM</suns>
  <zone>-4</zone>
  </loc>
- <lnks type="prmo">
- <link pos="1">
  <l>http://www.weather.com/allergies?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link1&cm_ite=Allergies</l>
  <t>Local Pollen Reports</t>
  </link>
- <link pos="2">
  <l>http://www.weather.com/flights?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link2&cm_ite=BusinessTraveler</l>
  <t>Airport Conditions</t>
  </link>
- <link pos="3">
  <l>http://www.weather.com/garden?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link3&cm_ite=Garden</l>
  <t>Lawn and Garden Weather</t>
  </link>
- <link pos="4">
  <l>http://www.weather.com/traffic?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link4&cm_ite=Traffic</l>
  <t>Rush Hour Traffic</t>
  </link>
  </lnks>                                                                        Note: Bolded area is the Advertizing that has to go:
- <dayf>                                                          Note: <dayf> is where the 5 day for cast starts. You can see most of the areas I use:
  <lsup>6/6/09 9:15 AM EDT</lsup>
- <day d="0" t="Saturday" dt="Jun 6">
  <hi>83</hi>
  <low>62</low>
  <sunr>6:20 AM</sunr>
  <suns>8:51 PM</suns>
- <part p="d">
  <icon>34</icon>
  <t>Mostly Sunny</t>
- <wind>
  <s>7</s>
  <gust>N/A</gust>
  <d>60</d>
  <t>ENE</t>
  </wind>
  <bt>M Sunny</bt>
  <ppcp>0</ppcp>
  <hmid>51</hmid>
  </part>
- <part p="n">
  <icon>29</icon>
  <t>Partly Cloudy</t>
- <wind>
  <s>2</s>
  <gust>N/A</gust>
  <d>53</d>
  <t>NE</t>
  </wind>
  <bt>P Cloudy</bt>
  <ppcp>10</ppcp>
  <hmid>69</hmid>
  </part>
  </day>
- <day d="1" t="Sunday" dt="Jun 7">
  <hi>90</hi>
  <low>65</low>
  <sunr>6:20 AM</sunr>
  <suns>8:51 PM</suns>
- <part p="d">
  <icon>34</icon>
  <t>Mostly Sunny</t>
- <wind>
  <s>6</s>
  <gust>N/A</gust>
  <d>202</d>
  <t>SSW</t>
  </wind>
  <bt>M Sunny</bt>
  <ppcp>10</ppcp>
  <hmid>58</hmid>
  </part>
- <part p="n">
  <icon>33</icon>
  <t>Mostly Clear</t>
- <wind>
  <s>3</s>
  <gust>N/A</gust>
  <d>154</d>
  <t>SSE</t>
  </wind>
  <bt>M Clear</bt>
  <ppcp>10</ppcp>
  <hmid>68</hmid>
  </part>
  </day>
- <day d="2" t="Monday" dt="Jun 8">
  <hi>90</hi>
  <low>68</low>
  <sunr>6:20 AM</sunr>
  <suns>8:52 PM</suns>
- <part p="d">
  <icon>37</icon>
  <t>Isolated T-Storms</t>
- <wind>
  <s>3</s>
  <gust>N/A</gust>
  <d>202</d>
  <t>SSW</t>
  </wind>
  <bt>Iso T-Storms</bt>
  <ppcp>30</ppcp>
  <hmid>62</hmid>
  </part>
- <part p="n">
  <icon>29</icon>
  <t>Partly Cloudy</t>
- <wind>
  <s>1</s>
  <gust>N/A</gust>
  <d>210</d>
  <t>SSW</t>
  </wind>
  <bt>P Cloudy</bt>
  <ppcp>20</ppcp>
  <hmid>72</hmid>
  </part>
  </day>
- <day d="3" t="Tuesday" dt="Jun 9">
  <hi>87</hi>
  <low>65</low>
  <sunr>6:20 AM</sunr>
  <suns>8:52 PM</suns>
- <part p="d">
  <icon>38</icon>
  <t>Scattered T-Storms</t>
- <wind>
  <s>3</s>
  <gust>N/A</gust>
  <d>245</d>
  <t>WSW</t>
  </wind>
  <bt>Sct T-Storms</bt>
  <ppcp>40</ppcp>
  <hmid>64</hmid>
  </part>
- <part p="n">
  <icon>11</icon>
  <t>Showers</t>
- <wind>
  <s>0</s>
  <gust>N/A</gust>
  <d>273</d>
  <t>CALM</t>
  </wind>
  <bt>Showers</bt>
  <ppcp>30</ppcp>
  <hmid>76</hmid>
  </part>
  </day>
- <day d="4" t="Wednesday" dt="Jun 10">
  <hi>82</hi>
  <low>65</low>
  <sunr>6:19 AM</sunr>
  <suns>8:53 PM</suns>
- <part p="d">
  <icon>38</icon>
  <t>Scattered T-Storms</t>
- <wind>
  <s>3</s>
  <gust>N/A</gust>
  <d>229</d>
  <t>SW</t>
  </wind>
  <bt>Sct T-Storms</bt>
  <ppcp>40</ppcp>
  <hmid>68</hmid>
  </part>
- <part p="n">
  <icon>11</icon>
  <t>Showers</t>
- <wind>
  <s>0</s>
  <gust>N/A</gust>
  <d>239</d>
  <t>CALM</t>
  </wind>
  <bt>Showers</bt>
  <ppcp>60</ppcp>
  <hmid>78</hmid>
  </part>
  </day>
  </dayf>
  </weather>
Now here is a copy of the code showing the path to my XML file with the filename and also shows the feilds I used trying to kill everything between them. I can get into more detail by sending you the actual XML file and then Highlighting the areas I use.
Thanks a million for all the help:
Automan

 

on Jun 06, 2009

This document is intended only for use by authorized licensees of The
The Weather Channel Interactive, Inc. All Rights Reserved.

 

is it just me, or does the scare other people too?

on Jun 06, 2009

RomanDA

This document is intended only for use by authorized licensees of The
The Weather Channel Interactive, Inc. All Rights Reserved.


 

is it just me, or does the scare other people too?

 

Uh, yeah. I don't see this kind of xml file anywhere for public download on weather.com. Automan, are you sure you're allowed to use this?

on Jun 06, 2009

Hithere again:

I signed up for the Weather.com XML and lave a license code and aut. code.

I pull today.XML and I pull 5 Day..

No prob folks, it is best to get a free license from them justlook on their site for tools and on the left of the list on down a ways the is the Weather.com XLM feed sign up "FREE"

This is mine with license:

<?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-2009, 
  -->
<!--
 The Weather Channel Interactive, Inc.  All Rights Reserved.            
  -->
- <weather ver="2.0">
- <head>
  <locale>en_US</locale>
  <form>MEDIUM</form>
  <ut>F</ut>
  <ud>mi</ud>
  <us>mph</us>
  <up>in</up>
  <ur>in</ur>
  </head>
- <loc id="37932">
  <dnam>Knoxville, TN (37932)</dnam>
  <tm>2:00 PM</tm>
  <lat>35.92</lat>
  <lon>-84.17</lon>
  <sunr>6:20 AM</sunr>
  <suns>8:51 PM</suns>
  <zone>-4</zone>
  </loc>
- <lnks type="prmo">
- <link pos="1">
  <l>http://www.weather.com/allergies?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link1&cm_ite=Allergies</l>
  <t>Local Pollen Reports</t>
  </link>
- <link pos="2">
  <l>http://www.weather.com/flights?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link2&cm_ite=BusinessTraveler</l>
  <t>Airport Conditions</t>
  </link>
- <link pos="3">
  <l>http://www.weather.com/garden?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link3&cm_ite=Garden</l>
  <t>Lawn and Garden Weather</t>
  </link>
- <link pos="4">
  <l>http://www.weather.com/traffic?par=xoap&site=textlink&cm_ven=XOAP&cm_cat=TextLink&cm_pla=Link4&cm_ite=Traffic</l>
  <t>Rush Hour Traffic</t>
  </link>
  </lnks>
- <cc>
  <lsup>6/6/09 1:53 PM EDT</lsup>
  <obst>Oak Ridge, TN</obst>
  <tmp>78</tmp>
  <flik>78</flik>
  <t>Fair</t>
  <icon>34</icon>
- <bar>
  <r>30.03</r>
  <d>falling</d>
  </bar>
- <wind>
  <s>5</s>
  <gust>N/A</gust>
  <d>0</d>
  <t>VAR</t>
  </wind>
  <hmid>45</hmid>
  <vis>10.0</vis>
- <uv>
  <i>10</i>
  <t>Very High</t>
  </uv>
  <dewp>55</dewp>
- <moon>
  <icon>13</icon>
  <t>Waxing Gibbous</t>
  </moon>
  </cc>
- <dayf>
  <lsup>6/6/09 12:13 PM EDT</lsup>
- <day d="0" t="Saturday" dt="Jun 6">
  <hi>83</hi>
  <low>62</low>
  <sunr>6:20 AM</sunr>
  <suns>8:51 PM</suns>
- <part p="d">
  <icon>32</icon>
  <t>Sunny</t>
- <wind>
  <s>5</s>
  <gust>N/A</gust>
  <d>54</d>
  <t>NE</t>
  </wind>
  <bt>Sunny</bt>
  <ppcp>0</ppcp>
  <hmid>48</hmid>
  </part>
- <part p="n">
  <icon>29</icon>
  <t>Partly Cloudy</t>
- <wind>
  <s>2</s>
  <gust>N/A</gust>
  <d>53</d>
  <t>NE</t>
  </wind>
  <bt>P Cloudy</bt>
  <ppcp>10</ppcp>
  <hmid>69</hmid>
  </part>
  </day>
- <day d="1" t="Sunday" dt="Jun 7">
  <hi>90</hi>
  <low>65</low>
  <sunr>6:20 AM</sunr>
  <suns>8:51 PM</suns>
- <part p="d">
  <icon>34</icon>
  <t>Mostly Sunny</t>
- <wind>
  <s>6</s>
  <gust>N/A</gust>
  <d>202</d>
  <t>SSW</t>
  </wind>
  <bt>M Sunny</bt>
  <ppcp>10</ppcp>
  <hmid>58</hmid>
  </part>
- <part p="n">
  <icon>33</icon>
  <t>Mostly Clear</t>
- <wind>
  <s>3</s>
  <gust>N/A</gust>
  <d>155</d>
  <t>SSE</t>
  </wind>
  <bt>M Clear</bt>
  <ppcp>10</ppcp>
  <hmid>68</hmid>
  </part>
  </day>
- <day d="2" t="Monday" dt="Jun 8">
  <hi>90</hi>
  <low>68</low>
  <sunr>6:20 AM</sunr>
  <suns>8:52 PM</suns>
- <part p="d">
  <icon>37</icon>
  <t>Isolated T-Storms</t>
- <wind>
  <s>4</s>
  <gust>N/A</gust>
  <d>212</d>
  <t>SSW</t>
  </wind>
  <bt>Iso T-Storms</bt>
  <ppcp>30</ppcp>
  <hmid>62</hmid>
  </part>
- <part p="n">
  <icon>27</icon>
  <t>Mostly Cloudy</t>
- <wind>
  <s>2</s>
  <gust>N/A</gust>
  <d>232</d>
  <t>SW</t>
  </wind>
  <bt>M Cloudy</bt>
  <ppcp>20</ppcp>
  <hmid>67</hmid>
  </part>
  </day>
- <day d="3" t="Tuesday" dt="Jun 9">
  <hi>87</hi>
  <low>65</low>
  <sunr>6:20 AM</sunr>
  <suns>8:52 PM</suns>
- <part p="d">
  <icon>38</icon>
  <t>Scattered T-Storms</t>
- <wind>
  <s>4</s>
  <gust>N/A</gust>
  <d>271</d>
  <t>W</t>
  </wind>
  <bt>Sct T-Storms</bt>
  <ppcp>40</ppcp>
  <hmid>65</hmid>
  </part>
- <part p="n">
  <icon>11</icon>
  <t>Showers</t>
- <wind>
  <s>0</s>
  <gust>N/A</gust>
  <d>318</d>
  <t>CALM</t>
  </wind>
  <bt>Showers</bt>
  <ppcp>30</ppcp>
  <hmid>78</hmid>
  </part>
  </day>
- <day d="4" t="Wednesday" dt="Jun 10">
  <hi>80</hi>
  <low>66</low>
  <sunr>6:19 AM</sunr>
  <suns>8:53 PM</suns>
- <part p="d">
  <icon>38</icon>
  <t>Scattered T-Storms</t>
- <wind>
  <s>3</s>
  <gust>N/A</gust>
  <d>244</d>
  <t>WSW</t>
  </wind>
  <bt>Sct T-Storms</bt>
  <ppcp>40</ppcp>
  <hmid>69</hmid>
  </part>
- <part p="n">
  <icon>11</icon>
  <t>Showers</t>
- <wind>
  <s>0</s>
  <gust>N/A</gust>
  <d>222</d>
  <t>CALM</t>
  </wind>
  <bt>Showers</bt>
  <ppcp>60</ppcp>
  <hmid>76</hmid>
  </part>
  </day>
  </dayf>
  </weather>

Automan

on Jun 06, 2009

Hey Folks:

Thought that I would give you the link for the Weather.com XML FREE Feed after you sign up and remember FREE, Then down load the SDK. Forget some of the stuff like placing the Weather.cm Logo with your projects...
All of the folks out there that use the XML Feed should at least sign-up......Only right....

 

Link: http://www.weather.com/weather/rss/subscription?from=footer

Have fun.

Automan

on Jun 06, 2009

Hi RomanDA;

I posted what ya need to feel safe using this and yes it it theirs, but you just sign up and ya have your on License and code. You woun't beleive the Weather Info you can get.

If you take a look at the post above a ways I have a link to my desktopX Theme.

Now here is the kick! Look at the middle top of the screen at the Today Weather and zero in on the Wind Direction and on the left of it the Brometer.

If someone can help me I can give all the in for and you woun't beleiv the widget you could build.

1. The XML file has to be downloaded every 30 minutes and not sooner.

2. You even then have mapping for raday and the best part WEATHER WARNINGS, whice a guy writting this for desktopX could use an all clea png and an animated warning right on your desktop when you are goiing to get slammed with bad weather.

3. It's all there for the taking, anyone in the ourld.....

We need to build code for this weather to hit all of the above, and then you have a REAL Weather Widget...Not just the Today and 5 Day forcast.

I always try to make it real and I sure would like to build allof what I have done in another program right into DesktopX with the person giving me the right to distribute the theme and to also give that person credit.

That should get some of those neurons jumping!!!

Take Care bud!!

Automan

on Jun 06, 2009

Ah, ok.

Line 7 of the code looks like this:

parsecontent = extractInfo(getcontent,"<to>","</to>"&vbcrlf)

 

Yours should look like this:

parsecontent = extractInfo(getcontent,"<lnks type=","</lnks>"&vbcrlf)

Leave out the "prmo"> because that will cause the error you're referring to.

This should remove the ad section and rewrite the file without it.

 

on Jun 06, 2009

Hi sViz;

Thanks for the shot, but I get a can't find file error now?

Any idea why that one happened?

I might have gotten lost the other post mentioned do a re-write of the section?

I took and copied the one you had as an example and pasted it over the same section iin the script I have for testing?

Thanks

Automan

 

on Jun 06, 2009

What exactly did the error say? (copy & paste it here)

If it can't find the xml file then your xml file has been moved or otherwise gone missing. While testing, I usually use a spare xml file that I place on my desktop. That way I can easily check the file frequently to see if the operation worked, or if something went wrong. Make sure to check your xml file after each application of the script to see if the operation has already been successfully executed.

3 Pages1 2 3