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.
It is currently October 5th, 2024, 3:12 pm
Weather Skins Not Working
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
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]
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 8350
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working - This is the only allowed thread about this
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
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
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"
Wow, that's great news. Thank You!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.
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
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"].
-
- Rainmeter Sage
- Posts: 8350
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
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?
Yeah, but I do update the group those measures belong to in the FinishAction of the WebParser parent...
Last edited by Yincognito on August 2nd, 2020, 1:21 am, edited 1 time in total.
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
LOL, There is no way I'm even going to attempt to figure out that mess you have going...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?
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
!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...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...
Just my opinion, but UpdateDivider=-1 is pretty much always a bad idea on any WebParser measure.
-
- Rainmeter Sage
- Posts: 8350
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
Well, that "mess" just provided an alternative in parsing the weather.com data...
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".
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.
-
- Developer
- Posts: 22819
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Weather Skins Not Working
Two hundred years ago you would have been burned at the stake...Yincognito wrote: ↑August 2nd, 2020, 1:25 am Well, that "mess" just provided an alternative in parsing the weather.com data...
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".
I was just asking if you're able to replicate the thing in a simple, basic skin, that's all.
-
- Rainmeter Sage
- Posts: 8350
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Weather Skins Not Working
Nah, I would have rebelled against the tyrants, and become a Robin Hood of some sort ... or the next emperor.