It is currently May 6th, 2024, 4:30 pm

Weather Skins Not Working

Get help with creating, editing & fixing problems with skins
Kotofanchik
Posts: 99
Joined: March 15th, 2024, 7:30 pm

Re: Weather Skins Not Working

Post by Kotofanchik »

I only get the en response when I click refresh in the webwiev context menu on the red dot. Is this how it should be? Updating the skin or the whole rainmetr does not give an answer en.
I have the wrong webwiev? I installed it along with the PluginWebViewExample skin
User avatar
Yincognito
Rainmeter Sage
Posts: 7206
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Kotofanchik wrote: March 31st, 2024, 3:15 pm I only get the en response when I click refresh in the webwiev context menu on the red dot. Is this how it should be? Updating the skin or the whole rainmetr does not give an answer en.
I have the wrong webwiev? I installed it along with the PluginWebViewExample skin
Apparently, you're facing the same problem as the one mentioned here, in the same thread I linked to earlier:
https://forum.rainmeter.net/viewtopic.php?t=39233&start=50#p221238

And no, it shouldn't happen - the "en" result should appear whenever you refresh the skin, not just when reloading the page from the red dot.

Unfortunately, this kind of problems are a consequence of the MS Edge + WebView Runtime recent development, which apparently "broke" some of the abilities of the (older) WebView plugin for Rainmeter. The plugin was built to function perfectly with earlier versions of MS Edge + WebView Runtime, which explains why after properly downgrading, I personally don't have these problems anymore.

You can try adding this to the [Rainmeter] section of your .ini file:

Code: Select all

OnRefreshAction=[!UpdateMeasure Page]
to automatically update the WebView measure one more time when refreshing the skin. Maybe insert a [!Delay 1000] after the = symbol, if needed, to postpone such an update by 1 second. See if that helps.

P.S. In retrospective, I feel that these parts about another weather site you want to parse and the WebView related ones after it should belong to a separate topic - just saying. This thread is mainly about the issues folks had with the weather.com source in the past. :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Kotofanchik
Posts: 99
Joined: March 15th, 2024, 7:30 pm

Re: Weather Skins Not Working

Post by Kotofanchik »

I decided to correct the display of the polar day and night in the skin. In the weather service, upon the onset of a polar day, the value of the duration of daylight hours in minutes - durm - becomes 1440 and does not increase further. Apparently if the polar night is zero? I took measurements and got the problem. I can't use comparison with zero. At the first moment there is always zero

Code: Select all

[mdurm]
Measure		=Plugin
Plugin		=WebParser
Url			=[mNow]
RegExp		="(?siU)#pole#"
StringIndex	=1
StringIndex2=1
;DynamicVariables=1

[mdurmcalc]
Measure=Calc
Formula=[mdurm]
;Formula=1440
DynamicVariables=1
UpdateDivider=5


IfCondition	  =mdurmcalc=0
IfTrueAction  = [!SetOption DaySunRise Text "Polar night"] [!HideMeter DayLength]
IfCondition2  =mdurmcalc=1440
IfTrueAction2 = [!SetOption DaySunRise Text "Polar day"] [!HideMeter DayLength]
User avatar
Yincognito
Rainmeter Sage
Posts: 7206
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Kotofanchik wrote: May 3rd, 2024, 9:50 am I decided to correct the display of the polar day and night in the skin. In the weather service, upon the onset of a polar day, the value of the duration of daylight hours in minutes - durm - becomes 1440 and does not increase further. Apparently if the polar night is zero? I took measurements and got the problem. I can't use comparison with zero. At the first moment there is always zero

Code: Select all

[mdurm]
Measure		=Plugin
Plugin		=WebParser
Url			=[mNow]
RegExp		="(?siU)#pole#"
StringIndex	=1
StringIndex2=1
;DynamicVariables=1

[mdurmcalc]
Measure=Calc
Formula=[mdurm]
;Formula=1440
DynamicVariables=1
UpdateDivider=5


IfCondition	  =mdurmcalc=0
IfTrueAction  = [!SetOption DaySunRise Text "Polar night"] [!HideMeter DayLength]
IfCondition2  =mdurmcalc=1440
IfTrueAction2 = [!SetOption DaySunRise Text "Polar day"] [!HideMeter DayLength]
As someone who tried to estimate polar days / nights before (in other contexts), I have to say that it won't be as easy as you imagine. That's probably why weather.com (you do use the skin at the beginning of this thread, right?) and other weather sevices don't really bother with that.

As for your code, since this thread is mostly about weather issues when using the weather.com source, this is probably not the right place to ask about your specific code, especially if it's using another way to get weahter data. Why not start a new topic in the Help: Rainmeter Skins section, properly describing the issue and giving the necessary details on what you're working with? For example, we don't know how [mNow] looks, what exactly is it providing, if it's itself a WebParser measure, how does the #pole# variable looks, and so on. To get help successfully, one should provide enough details so that the ones trying to help are able to replicate or test the code themselves.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Kotofanchik
Posts: 99
Joined: March 15th, 2024, 7:30 pm

Re: Weather Skins Not Working

Post by Kotofanchik »

I created a topic about my problems with the polar night. :D The weather site itself is not public, so I made a piece of skin that works with a local file. The problem is repeated there.
https://forum.rainmeter.net/viewtopic.php?t=44011
User avatar
Yincognito
Rainmeter Sage
Posts: 7206
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

Kotofanchik wrote: May 3rd, 2024, 3:42 pm I created a topic about my problems with the polar night. :D The weather site itself is not public, so I made a piece of skin that works with a local file. The problem is repeated there.
https://forum.rainmeter.net/viewtopic.php?t=44011
Good idea, I'll check it out. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth