It is currently August 9th, 2022, 10:35 pm

SimpleWeather 2 (Update 1/11/22)

Weather skins
dnicks
Posts: 10
Joined: November 18th, 2021, 6:54 pm

SimpleWeather 2 (Update 1/11/22)

Post by dnicks »

Image

Image

Image

CREDIT: TO XENIUM / WINDOWS 10 WEATHER ENTERPRISE SKIN
I used that skin to learn and as a base for this one.

CREDIT: TO RAINMETER DOCUMENTATION / COMMUNITY
Many helpful tips were found in both sources.



Updated to v1.1
- fixed ShowSettingsIcon variable value
- fixed order of variables in [Variables] section (credit: eclectic-tech, thank you)

Updated to v2
- switched settings to it's own window
- added highlight to show current size
- added color picker for top and bottom colors
- added fonts to choose from
- colored the moon icons
- colored snow and rain pure white
- added an option to set minimum precipitation percentage that will show
- added a version with no hourly temps

v2.1
- Added new API

*Don't forget to go into @Resources/Fonts and install all the fonts onto your system*
You do not have the required permissions to view the files attached to this post.
Last edited by dnicks on January 11th, 2022, 7:40 am, edited 7 times in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4801
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: SimpleWeather

Post by eclectic-tech »

Nicely done! :thumbup:

I would suggest you modify your [Variables] section... because you have several @includes between the included variables file and the "in-the-skin" defined variables.

Those "in-the-skin" variables are not being loaded, which end up creating calc errors in the log:
Formula: "#ShowSettingsIcon#" is unknown: (1-(1-(1-(1-(1-#ShowSettingsIcon#))))) (Simple Weather\SimpleWeather.ini)

To correct this error, change the order of your @includes and "in-the-skin" variables:

Code: Select all

[Variables]
@Include=#@#Variables.inc
size=#SizeValue#

ShowDetails=1
ShowDetailsIcon=0
ShowSettings=1
ShowSettingsIcon=1

@Include2=#@#RegExp.inc
@Include3=#@#Measures.inc
@Include4=#@#Translation.inc


Placing the "in-the-skin" variables before any additional @includes that contain new sections, eliminates undefined variable errors.
dnicks
Posts: 10
Joined: November 18th, 2021, 6:54 pm

Re: SimpleWeather

Post by dnicks »

eclectic-tech wrote: December 19th, 2021, 5:53 am Nicely done! :thumbup:

I would suggest you modify your [Variables] section... because you have several @includes between the included variables file and the "in-the-skin" defined variables.

Those "in-the-skin" variables are not being loaded, which end up creating calc errors in the log:
Formula: "#ShowSettingsIcon#" is unknown: (1-(1-(1-(1-(1-#ShowSettingsIcon#))))) (Simple Weather\SimpleWeather.ini)

To correct this error, change the order of your @includes and "in-the-skin" variables:

Code: Select all

[Variables]
@Include=#@#Variables.inc
size=#SizeValue#

ShowDetails=1
ShowDetailsIcon=0
ShowSettings=1
ShowSettingsIcon=1

@Include2=#@#RegExp.inc
@Include3=#@#Measures.inc
@Include4=#@#Translation.inc


Placing the "in-the-skin" variables before any additional @includes that contain new sections, eliminates undefined variable errors.
Thank you!

Can you explain

Code: Select all

(1-(1-(1-(1-(1-#ShowSettingsIcon#)))))
I had that as just (1-#ShowSettingsIcon) and it seemed to be working.
Thanks.

Edit - I see that section is adding (1-) on every click of "more" and "less" details. Is there a way to keep that from happening?
Edit2 - My mistake. I had the initial value of #ShowSettingsIcon# wrong. Fixed in 1.1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4801
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: SimpleWeather

Post by eclectic-tech »

dnicks wrote: December 19th, 2021, 7:28 pm Thank you!

Can you explain

Code: Select all

(1-(1-(1-(1-(1-#ShowSettingsIcon#)))))
I had that as just (1-#ShowSettingsIcon) and it seemed to be working.
Thanks.

Edit - I see that section is adding (1-) on every click of "more" and "less" details. Is there a way to keep that from happening?
Edit2 - My mistake. I had the initial value of #ShowSettingsIcon# wrong. Fixed in 1.1
Multiple subtraction formulas in the log usually means the involved variable's initial value cannot be determined. In your case because the variable was defined after multiple includes that had sections defined, those variables were not established.
Yes, so setting the initial value in the [Variables] section or re-arranging where the skin variables are placed will correct the error.
Glad you figured it out.
Nice work on this :thumbup:
dnicks
Posts: 10
Joined: November 18th, 2021, 6:54 pm

Re: SimpleWeather

Post by dnicks »

Thanks :D