It is currently April 19th, 2024, 5:13 pm

weather skin question(s)

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: weather skin question(s)

Post by balala »

JamX wrote: February 29th, 2020, 11:40 am Somehow the Substitute="(?iU)^.*(\d+) .*$":"\1" is not working but it work in the forecasting code. there I use the same Substitute
It is working well. If I remove the RegExpSubstitute and the Substitute options from the [@CurrentWindKMH] measure, I get the current, not substituted value returned by the measure. Right now this is 2 MAR. Adding back the previously removed options, I get 2. Perfect, because the Substitute option eliminates the string, keeping only the number, in this case 2.
Not sure how did you get the posted value:
JamX wrote: February 29th, 2020, 11:40 am @CurrentWindKMH -> 2 = NOK should be 32 since string 16 is SSW 32 km/h
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: weather skin question(s)

Post by JamX »

Found the error:

Code: Select all

[@CurrentWindKMH]
Measure=WebParser
Group=Weather | WeatherCurrent
Url=[@ForecastParent]
StringIndex=16
RegExpSubstitute=1
Substitute="(?iU)^.*(\d+) .*$":"\1"
Url=[@ForecastParent] replaced by Url=[@CurrentParent]

Now the measure is OK