It is currently July 10th, 2020, 12:27 pm

SmallWeather - work in progress

Post your work-in-progress and completed skins to share and discuss.
ms310
Posts: 224
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

jsmorley wrote:
June 12th, 2020, 1:41 pm
તમારું સ્વાગત છે !
At least I provided a translation! Gujarati? That’s is obscure for sure!

But seriously - thanks! I hope folks like the resulting skin and icons I am creating.
ms310
Posts: 224
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

One thing I am trying to reconcile - at this moment:

iconName: night_sprinkles
weather_description: Sprinkles, Fog & Mild

I think I need to make a layered set of icons that searches for keywords.

Base icon: night_sprinkles
Addon: regex for keywords - in this case, FOG, then add a semi-transparent FOG icon on top of the base

Might be interesting.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: SmallWeather - work in progress

Post by eclectic-tech »

ms310 wrote:
June 12th, 2020, 2:43 pm
One thing I am trying to reconcile - at this moment:

iconName: night_sprinkles
weather_description: Sprinkles, Fog & Mild

I think I need to make a layered set of icons that searches for keywords.

Base icon: night_sprinkles
Addon: regex for keywords - in this case, FOG, then add a semi-transparent FOG icon on top of the base

Might be interesting.
I created WeatherNow using this same site. Rather than re-invent the wheel, or a condition text search, the measures will return the condition icon number you can use to reference numbered condition images.

Feel free to use the measures I created to pull the icon number and the related images (one set is from your "Weather and WorldTime" skin :D ).
ms310
Posts: 224
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

eclectic-tech wrote:
June 12th, 2020, 2:54 pm
I created WeatherNow using this same site. Rather than re-invent the wheel, or a condition text search, the measures will return the condition icon number you can use to reference numbered condition images.

Feel free to use the measures I created to pull the icon number and the related images (one set is from your "Weather and WorldTime" skin :D ).
Thank you Eclectic-tech - I have robbed several of your skins to make this (attributed in the post and inside the skin) - THANK YOU!

I don't like the URL they provide - they reuse several icons for things like "sprinkles with fog" and "sprinkles" - I might end up with this method (which is stolen from your code!) but I might try as an exercise to make a layered icon approach utilizing the details in the description. Maybe.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: SmallWeather - work in progress

Post by eclectic-tech »

ms310 wrote:
June 12th, 2020, 3:06 pm
Thank you Eclectic-tech - I have robbed several of your skins to make this (attributed in the post and inside the skin) - THANK YOU!

I don't like the URL they provide - they reuse several icons for things like "sprinkles with fog" and "sprinkles" - I might end up with this method (which is stolen from your code!) but I might try as an exercise to make a layered icon approach utilizing the details in the description. Maybe.
Go for it! That is something I would be interested in. I hope it works out for you... :thumbup:
Then I might borrow it for one of my skins! ;-)
ms310
Posts: 224
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

eclectic-tech wrote:
June 12th, 2020, 3:21 pm
Go for it! That is something I would be interested in. I hope it works out for you... :thumbup:
Then I might borrow it for one of my skins! ;-)
And I may lean on you for help with the RegEx :)

Cheers!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: SmallWeather - work in progress

Post by eclectic-tech »

ms310 wrote:
June 12th, 2020, 3:29 pm
And I may lean on you for help with the RegEx :)

Cheers!
As best I can... not an expert, but have plenty of trial and error experience!
ms310
Posts: 224
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

Question - can I create complicated IFCONDITIONS with multiple Measures?

Example:

[MeasureSun]
...

[MeasureSky]
...

[MeasureAir]
...

[MeasureIcon]
IFCONDITION=(MeasureSun=1) && (MeasureSky=4) && (MeasureAir=3)
IFTRUEACTION=[!SetOption MeterIcon Image "#@#\Icons\Sun1_Sky4_Air_3.png"]
and so on ...

Is there a way to accomplish this?


Eureka! I think I have sorted it out. If I can assign numeric values to each category that will provide unique numbers then this method will work. Now to come up with a numbering scheme:

Code: Select all

[MeasureDay]
Measure=Calc
Formula=2

[MeasureSky]
Measure=Calc
Formula=1

[MeasureAir]
Measure=Calc
Formula=1

[MeasureIcon]
Measure=Calc
Formula=[MeasureDay]+[MeasureSky]+[MeasureAir]
DynamicVariables=1
The idea would be to have MeasureIcon return a unique value for combinations like "Daytime, Sprinkles, Fog" and such.

I find the challenge interesting - especially stuck working from home for the foreseeable future.
ms310
Posts: 224
Joined: April 1st, 2015, 7:16 am

Re: SmallWeather - work in progress

Post by ms310 »

While this is working and returning the correct value I am getting a syntax error:

Calc: Syntax error (SmallWeather\SmallWeather.ini - [CalcIcon])

Code: Select all

[CalcIcon]
Measure=Calc
Formula=[#[&MeasureprecipitationDesc]]+[#[&MeasureSkyDescription]]+[MeasureDaylight]
DynamicVariables=1
I have tried adding brackets, same error:

Code: Select all

Formula=([#[&MeasureprecipitationDesc]])+([#[&MeasureSkyDescription]])+([MeasureDaylight])
Any ideas?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: SmallWeather - work in progress

Post by eclectic-tech »

Where are those values coming from?
Does the measure return a value even though there is a calc error?

I would need to see your entire code, but it may be caused by the referenced measures being child webparser measures, and do not return a value until the parent webparser measure updates.

Try having the measure disabled, then add a FinishAction to the parent webparser to enable it and update it.