Chasbo Chasbo

Desktop X Weather Widgets not functioning

Desktop X Weather Widgets not functioning

Lost functionality

My DX weather widgets stopped working. This has happened before in years past. I don't know of a solution. 

175,861 views 42 replies
Reply #26 Top

Quoting RedneckDude, reply 25

There's one.

I installed DX 4.0. But there is one problem... look at your PM. The DesktopX Builder.exe is MISSING!!! How I can edit the widget???

Reply #27 Top

I uninstalled DesktopX 4.0. Then installed my old DesktopX 3.50. Works great. That was good news. And now the bad ones...

I can’t fix your widget because it works through the WEATHER UNDERGROUND. I need the widget from which you got this function:

Quoting RedneckDude, reply 20

Function Object_OnLButtonUp(x,y,dragged)
If dragged = False Then
x = DesktopX.ScriptObject("weather_image").location
If IsNumeric(x) = False Then x = Object.Text
x = InputBox("Please enter the zip code or location that you would like to display the weather for:" & vbNewLine & "e.g. 48152 or York,England", "Select location ...", x)
If IsNumeric(x) = False Then
Set http = CreateObject("Microsoft.XmlHttp")
Randomize
str_RANDOM_URL="&rnd=" & rnd()
http.Open "GET", "http://xml.weather.com/search/search?where=" & x, False
http.send ""
' Store data in a string
weatherdata = http.responseText
If InStr(weatherdata, "loc id") > 0 Then
weatherdata = Right(weatherdata, Len(weatherdata) - InStr(weatherdata, "loc id") - 7)
weatherdata = Left(weatherdata, InStr(weatherdata, "type") - 3)
x = weatherdata
End If
End If
If x <> "" Then
DesktopX.ScriptObject("weather_image").location = x
DesktopX.ScriptObject("weather_image").Object_OnTimer6001
End If
End If
End Function

Reply #28 Top

Vad, builder hasn't been around for a good while.  Check your PM.

 

Reply #29 Top

Quoting RedneckDude, reply 28

Vad, builder hasn't been around for a good while

The problem was solved. Everything works fine, so forget about these trifles... :)  

Please, give me a link to download any widget which works with weather.com and uses the function from Reply #27.

I cannot fix any other scripts because it takes too long to study how they work...

Reply #30 Top

Here is the link to the fixed Stardock's Silica Weather widget:

https://www.sendspace.com/file/hqrwrt

I did this a few minutes ago. You may see how it work now.

+1 Loading…
Reply #31 Top

Sorry Vad, I'm not putting a credit card into a "free" account in order to get this file.

 

Edit:, after closing and reopening the page it let me download for free.

Reply #32 Top

Quoting RedneckDude, reply 31

Edit:, after closing and reopening the page it let me download for free.

Damn scammers! They talked about a free service! >:(  Hmm... In the Firefox, it doesn't ask for a credit card... Anyway I'm sorry. :pout:  

So I decided to post the fixed code here to bypass any uploads/downloads.

1. The part of Function from DesktopX.ScriptObject ("weather_location") (it searches for a TWC weather code by Location Name):

Function Object_OnLButtonUp(x,y,dragged)
If dragged = False Then
x = DesktopX.ScriptObject("weather_image").location
'If IsNumeric(x) = False Then x = Object.Text
x = InputBox("Please enter the zip code or location that you would like to display the weather for:" & vbNewLine & "e.g. 48152 or York,England", "Select location ...", x)
If IsNumeric(x) = False Then
Set http = CreateObject("Microsoft.XmlHttp")
Randomize
str_RANDOM_URL="&rnd=" & rnd()    '<---  HERE IS YOUR FIX --->
http.Open "GET", "http://wxdata.weather.com/wxdata/search/search?where=" & x, False
http.send ""
' Store data in a string ..........................................................................................................................................................................
End Function

As you see, we have already dealt with this Function.

2. The part of Subroutine from DesktopX.ScriptObject ("weather_image") (it retrieves and analyzes the weather data):

Sub Object_OnTimer6001
If location <> "" And location <> "Not found" Then
If System.InternetConnected Then
On Error Resume Next
' Create a web object
Set http = CreateObject("Microsoft.XmlHttp")
' Retrieve data
Randomize
str_RANDOM_URL = "&rnd=" & rnd()
If tempunit = "m" Then
str_UNITS = "&unit=m"
Else
str_UNITS = "&unit=s"
End If   '<---  HERE IS YOUR FIX --->
http.Open "GET", "http://wxdata.weather.com/wxdata/weather/local/" & location & "?cc=*&dayf=5" & str_UNITS & str_RANDOM_URL, False
http.send ""
' Store data in a string.............................................................................................................................................
End Sub

That's all. Just change these two lines in your code and any widget received data from weather.com will work without errors.

Good luck and Happy Coding :)  

Reply #34 Top

I don't mean to whine, but the Silica weather has an issue where you have to set city every time you load it. It doesn't remember the city you set.

Reply #35 Top

Sviz scripts created a folder on the PC that would contain items to cause it to remember the location.

Reply #36 Top

Quoting RedneckDude, reply 34

I don't mean to whine, but the Silica weather has an issue where you have to set city every time you load it. It doesn't remember the city you set.

Jim, my goal was to fix the widget’s access to the weather forecast, and I did it. Nothing more. I don’t even know where and how this Silica stores location records...

I can and I am ready to help. But I cannot do your work in your place. These are your widgets and only you know how they should work. Not me.


Please give me a link to any of your old widgets that worked with weather.com (not through WU). I will fix this widget and you will use it as a template.
Or you can do it yourself using the instructions from: Reply #32

Vad.

P.S. Here are a few other working widgets: Widget Examples.zip

Reply #37 Top

Quoting Vad_M, reply 36

Jim, my goal was to fix the widget’s access to the weather forecast, and I did it. Nothing more. I don’t even know where and how this Silica stores location records...

I can and I am ready to help. But I cannot do your work in your place. These are your widgets and only you know how they should work. Not me.

 

Oh, Vad, that wasn't aimed at you. Sorry.  it was a general rant/bitch about the way things work. I didn't expect you to fix it, though I was hoping someone would have an answer.

 

I can't code, so, I guess it is what it is.

 

I appreciate the fixing of Silica, at least now I have a template.

Reply #38 Top

All (if I recall correctly) of my widgets are using WU, as that is the script that Sviz used.  I will just likely delete all my non working weather, and not upload weather anymore due to the fickleness of the feeds.  I MIGHT use silica as a template for future skins.

Reply #39 Top

Thank you for the examples, Vadim.

Reply #40 Top

Quoting RedneckDude, reply 38

All (if I recall correctly) of my widgets are using WU, as that is the script that Sviz used.

There is an easy way to check the widget in the DX List Objects (turn off the Internet earlier!!!). The widget is not editable if you will see any objects with "WU ..." in their names. But if you will see an object like "weather_image", "weatherimage", etc... this is what you need.

Quoting RedneckDude, reply 39

Thank you for the examples.

Hi Jim,

All widgets in the "Examples" based on _Martin_ script. I think that the easiest way for you would be to use one of adni's widgets, because GT3 writes data to the Windows registry, which is not very good. Adni's widgets also have fewer objects and features, which makes them easier to use as example.

Good Luck! :)  

P.S. There is no doubt that in a few days your widgets will work again!

 

Reply #42 Top

Jim, YOU ROCK! B)  

+1 Loading…