It is currently April 18th, 2024, 9:16 am

Skin Metadata Version from variables.inc

Get help with creating, editing & fixing problems with skins
User avatar
The Old Man
Posts: 2
Joined: March 5th, 2018, 12:23 pm

Skin Metadata Version from variables.inc

Post by The Old Man »

Hi all,

Relatively new to Rainmeter. I have a number of skins in a countdown gadget pack and I have recently started to make life easier when updating them all by using include files to contain settings and variables:

Code: Select all

[Rainmeter]

; Include external files in resources folder
@Include1=#@#variables.inc
@Include2=#@#styles.inc
@Include3=#@#globalconfigs.inc
When I insert a Version variable into my variables.inc file:-

Code: Select all

; About:
;	Sets variables and makes them available to skins that include the 
;	"variables.inc" file.

[Variables]
Version=2.2
MainFont=Segoe UI
SecondaryFont=Cinzel
SolidBlack=0,0,0,255
SolidWhite=255,255,255,255
Gold=F7B731
Transparent=0,0,0,1
and add the variable name to my skin's .ini:

Code: Select all

... 
[Metadata] 
Version=#Version#
...
I've found that the version no longer shows in the Rainmeter Manage Skins Meta section, instead it says #Version# instead of 2.2

I've also tried:

Code: Select all

Version=#@#variables.inc#Version#
in the skin's .ini file, but again that shows literately as text instead of the actual value of Version in Rainmeter.

Am I doing this incorrectly, or is it not possible for Rainmeter to fetch the version from a skin's include file?

Many thanks!
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Metadata Version from variables.inc

Post by jsmorley »

The Manage dialog does not actually run the skin, so it can't resolve any variables in [MetaData].

When you click on the skin in the list in Manage, at that time Manage opens and reads the plain text of the file, looking for a [MetaData] section and displaying the supported values. If the skin is actually loaded and running, then it also parses the config options from Rainmeter.ini to work with the values found there, like the current screen position and Draggable and KeepOnScreen and such.

At no time does it update or execute anything in the skin, so you can't use variables or formulas in [MetaData]. and the [MetaData] section can't be something you put in an @Include file.
User avatar
The Old Man
Posts: 2
Joined: March 5th, 2018, 12:23 pm

Re: Skin Metadata Version from variables.inc

Post by The Old Man »

Okay thank you for explaining that JS, much appreciated.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Metadata Version from variables.inc

Post by jsmorley »

My pleasure.
User avatar
Yincognito
Rainmeter Sage
Posts: 7120
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Skin Metadata Version from variables.inc

Post by Yincognito »

The Old Man wrote: January 10th, 2019, 12:17 pmI've found that the version no longer shows in the Rainmeter Manage Skins Meta section, instead it says #Version# instead of 2.2

I've also tried:

Code: Select all

Version=#@#variables.inc#Version#
in the skin's .ini file, but again that shows literately as text instead of the actual value of Version in Rainmeter.

Am I doing this incorrectly, or is it not possible for Rainmeter to fetch the version from a skin's include file?

Many thanks!
You can always use the InputText plugin to set the version of your skins to whatever you like. Doing a refresh/reload of the skins once you hit enter in order to use the WriteKeyValue bang to update the version in the Metadata section of your skins is relatively easy to do. I successfully use this method in my skin suite to update the version. I can provide a small sample on how to do it, if you like (but you take care of clearing the stuff you don't need from the sample).

Of course, if one can write the version with the above bang anywhere in the skins, he could obviously write it down to the variable section of Variables.inc and load it from there when needed:
Version.jpg
Bottom left corner: version is read from Variables.inc, it can be modified inside this skin (called Settings), which will trigger a refresh/reload of all the skins (including this one) and be available again to the user.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth