It is currently October 22nd, 2021, 7:03 am

Weather Skins Not Working

Help with creating, editing & fixing problems with skins
User avatar
raiguard
Posts: 658
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Weather Skins Not Working

Post by raiguard »

Just wanna pop in and say, I'm really impressed by the level of commitment everyone has for this. I'm not the best at being patient and I probably would have just given up at this point. But no, jsmorley and co. just keep pressing on! Great job guys/gals, you're all amazing.

Maybe I'll actually finally update my Weather Meter soon... hopefully. ;-)
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

Just to follow up...

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
MyString=\uD834\uDF06

[MeasureReadStringFromFile]
Measure=WebParser
URL=file://#CURRENTPATH##CURRENTFILE#
CodePage=1200
RegExp=(?siU)MyString=(.*)\r\n
StringIndex=1
DecodeCodePoints=1

[MeterDisplay]
Meter=String
MeasureName=MeasureReadStringFromFile
FontSize=25
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Look, I found a %1, which is the same as [\xD834][\xDF06]

1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working - This is the only allowed thread about this

Post by Yincognito »

jsmorley wrote: August 2nd, 2020, 12:35 am Done... The beta with this new option is out.
Brilliant - it works flawlessly! I don't think I expected a feature so eagerly before, LOL - must have been the first one downloading the new beta. Just one thing though...if I'm applying this to an "itermediate" WebParser child (which also does some regexp substitutions; my bad, it doesn't actually), it doesn't work, I have to apply it on the "final" WebParser child (aka the grandchild). Don't bother with the variables below, they are just normal strings, the idea is important.
The parent:

Code: Select all

[MS_WebParser_Weather]
Measure=WebParser
Url="#WeatherURL#"
UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
RegExp=#Flag##Weather#
UpdateRate=(#DetectionUpdateDivider#*#UpdateInterval#/#SlidingUpdate#)
FinishAction=[!SetVariable MomentIndex -1][!UpdateMeasureGroup "WeatherGroup"][!UpdateMeasureGroup "WeatherDerivativeGroup"][!UpdateMeasureGroup "MomentGroup"][!SetOption MT_Rainmeter_ForecastDayPartTopic StringAlign "Left"][!SetOption MT_Rainmeter_ForecastDayPartTopic X (#ContainerWidth#)][!SetOption MT_Rainmeter_ForecastDayPartTopic Text "#ForecastDayPartTopicText#"][!UpdateMeter *][!EnableMeasure "MS_Rainmeter_Counter"][!EnableMouseActionGroup "MouseOverAction|MouseLeaveAction|MouseScrollUpAction|MouseScrollDownAction|LeftMouseUpAction|MiddleMouseUpAction|RightMouseUpAction" MouseActionsGroup][!Redraw]
OnConnectErrorAction=[!SetVariable MomentIndex -1][!UpdateMeasureGroup "WeatherGroup"][!UpdateMeasureGroup "WeatherDerivativeGroup"][!UpdateMeasureGroup "MomentGroup"][!SetOption MT_Rainmeter_ForecastDayPartTopic StringAlign "Left"][!SetOption MT_Rainmeter_ForecastDayPartTopic X (#ContainerWidth#)][!SetOption MT_Rainmeter_ForecastDayPartTopic Text "#ForecastDayPartTopicText#"][!UpdateMeter *][!EnableMeasure "MS_Rainmeter_Counter"][!EnableMouseActionGroup "MouseOverAction|MouseLeaveAction|MouseScrollUpAction|MouseScrollDownAction|LeftMouseUpAction|MiddleMouseUpAction|RightMouseUpAction" MouseActionsGroup][!Redraw]
OnRegExpErrorAction=[!SetVariable MomentIndex -1][!UpdateMeasureGroup "WeatherGroup"][!UpdateMeasureGroup "WeatherDerivativeGroup"][!UpdateMeasureGroup "MomentGroup"][!SetOption MT_Rainmeter_ForecastDayPartTopic StringAlign "Left"][!SetOption MT_Rainmeter_ForecastDayPartTopic X (#ContainerWidth#)][!SetOption MT_Rainmeter_ForecastDayPartTopic Text "#ForecastDayPartTopicText#"][!UpdateMeter *][!EnableMeasure "MS_Rainmeter_Counter"][!EnableMouseActionGroup "MouseOverAction|MouseLeaveAction|MouseScrollUpAction|MouseScrollDownAction|LeftMouseUpAction|MiddleMouseUpAction|RightMouseUpAction" MouseActionsGroup][!Redraw]
DynamicVariables=1
The "itermediate" child:

Code: Select all

[MS_WebParser_Weather_Location]
Group=WeatherGroup
Measure=WebParser
Url=[MS_WebParser_Weather]
StringIndex=1
RegExp=#Flag##Location#
StringIndex2=1
DecodeCodePoints=1
UpdateDivider=-1
The "final" child:

Code: Select all

[MS_WebParser_Weather_Location_District]
Group=WeatherGroup
Measure=WebParser
Url=[MS_WebParser_Weather_Location]
StringIndex=1
RegExp=#Flag##District#(#Data#)#Stop#
StringIndex2=1
UpdateDivider=-1
DecodeCodePoints=1
RegExpSubstitute=1
Substitute="#Decoder#","(?:^\s+|\s+$)":"",'(?:^"|"$)':"","(?i)(?:^$|^N\/A$|^null$)":"No District"
So, if I comment out the option in [MS_WebParser_Weather_Location_District], it doesn't produce the desired effect. I'm probably missing something here, or it's indeed the expected behavior. I was thinking that I could apply this options to just my 4 "intermediate" WebParser children (i.e. Location, Observation, DateTime and DailyForecast), without bothering adding the option to the more than 4 "final" children.
jsmorley wrote: August 2nd, 2020, 12:55 amNote that this supports "normalization" of Unicode code points as well.

https://flaviocopes.com/unicode/#normalization

So the string \uD834\uDF06 would decode to 𝌆

P.S. This also works with Character Variables in Rainmeter.
Wow, that's great news. Thank You! :rosegift:
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

I'm not sure. I think Brian would need to weigh in on whether or not a StringIndex2 option in fact creates a "child" measure in the eyes of WebParser. I would also be a bit concerned about how the UpdateDivider=-1 is being handled in this case. Don't forget that WebParser "parent" functionality depends on UpdateRate or [!CommandMeasure MeasureName "Update"].
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

jsmorley wrote: August 2nd, 2020, 1:10 am I'm not sure. I think Brian would need to weigh in on whether or not a StringIndex2 option in fact creates a "child" measure in the eyes of WebParser. I suspect not...
I see... :???: I'm curious what Brian has to say about this. Just a follow up question: you are able to replicate it, aren't you?
jsmorley wrote: August 2nd, 2020, 1:10 amI would also be a bit concerned about how the UpdateDivider=-1 is being handled in this case. Don't forget that WebParser "parent" functionality depends on UpdateRate or [!CommandMeasure MeasureName "Update"].
Yeah, but I do update the group those measures belong to in the FinishAction of the WebParser parent... :confused:
Last edited by Yincognito on August 2nd, 2020, 1:21 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

Yincognito wrote: August 2nd, 2020, 1:19 am I see... :???: I'm curious what Brian has to say about this. Just a follow up question: you are able to replicate it, aren't you?
LOL, There is no way I'm even going to attempt to figure out that mess you have going... ;-)
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

Yincognito wrote: August 2nd, 2020, 1:19 am Yeah, but I do update the group those measures belong to in the FinishAction of the WebParser parent... :confused:
!UpdateMeasure doesn't really do much on a WebParser measure. So instead of 600 skin updates until it performs the functionality, it's now 599 skin updates...

Just my opinion, but UpdateDivider=-1 is pretty much always a bad idea on any WebParser measure.
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

jsmorley wrote: August 2nd, 2020, 1:20 am LOL, There is no way I'm even going to attempt to figure out that mess you have going... ;-)
Well, that "mess" just provided an alternative in parsing the weather.com data... :lol:
Joking aside, I know you're scared of my codes, LOL. Relax, I'm not going to bother you with my "hideously complicated" erm..."mess". :rolmfao:

I was just asking if you're able to replicate the thing in a simple, basic skin, that's all.

EDIT: Just commented out the UpdateDivider=-1 from both the intermediate child and the final one. Same result.
Last edited by Yincognito on August 2nd, 2020, 1:28 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather Skins Not Working

Post by jsmorley »

Yincognito wrote: August 2nd, 2020, 1:25 am Well, that "mess" just provided an alternative in parsing the weather.com data... :lol:
Joking aside, I know you're scared of my codes, LOL. Relax, I'm not going to bother you with my "hideously complicated" erm..."mess". :rolmfao:

I was just asking if you're able to replicate the thing in a simple, basic skin, that's all.
Two hundred years ago you would have been burned at the stake... 😜
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather Skins Not Working

Post by Yincognito »

jsmorley wrote: August 2nd, 2020, 1:27 am Two hundred years ago you would have been burned at the stake... 😜
Nah, I would have rebelled against the tyrants, and become a Robin Hood of some sort ... or the next emperor. 8-)