It is currently April 27th, 2024, 6:35 pm

MeasureName in MeterStyle

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: MeasureName in MeterStyle

Post by Yincognito »

I think both the Rainmeter way (mentioned by RicardoTM) and the Lua way (mentioned by me) are perfectly valid and elegant for this task, and easy to apply, especially if one names the sections in a suited manner from the start when it comes to the Rainmeter way (harder to do that when you already named tons of sections in a different way, that's true).

Like RicardoTM, I also use only the Rainmeter way when I need such a "feature", but yeah, besides the naming practice which adds some constraints to the method (which is a minor issue in simpler scenarios), probably the biggest problem with the method is its reduced flexibility compared to the Lua way.

A very simple example: you can easily reference a measure based on the name of the current meter (or viceversa) by adding a prefix or suffix to the latter, but then, if you also need to do the reverse at the same time and reference the corresponding meter based on the name of the current measure (or some other more complex scenario) you can't as there's no "inline" way in Rainmeter to remove a specific part from #CURRENTSECTION# and end up with the string without the said prefix or suffix. You can of course pass the string to a String measure and use a Substitute to do it, but you'd have to either create as many additional String measures as you need for this, or hack your way into reusing a single such measure via updating it for every use case.

Fortunately, there are almost always more ways to skin a cat, so to speak, and each user can choose the method that suits his scenario.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
RicardoTM
Posts: 268
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: MeasureName in MeterStyle

Post by RicardoTM »

Yincognito wrote: February 7th, 2024, 4:58 pm Fortunately, there are almost always more ways to skin a cat, so to speak, and each user can choose the method that suits his scenario.
😧