I need to grab variables from a specific .INC file. The INC files contain colour theme variables. In each skin, the include bracket contains:
@Include1=#SKINSPATH#\Desktop+\Themes\#usedtheme#.INC
#usedtheme# changes depending on the theme you choose. Now I want to grab variables from each #usedtheme#.INC file, each containing this:
Theme1.INI
Color1=255,255,255
Theme2.INI
Color1=100,100,100
Theme3.INI
Color1=0,0,0
How do I, within a meter, reference a variable from a specific config?
I thought SolidColor=#color1# "#SKINSPATH#\Desktop+\Themes\Theme1.INC" would work, but obviously it did not.
It is currently April 27th, 2024, 11:18 am
Trying to reference a specific duplicate variable
-
- Posts: 478
- Joined: February 26th, 2011, 10:22 pm
Trying to reference a specific duplicate variable
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
Dropdown menu bar & app launcher for Windows & Rainmeter
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: Trying to reference a specific duplicate variable
Sections from an included file are automatically applied just as if they had been written in the skin .INI itself. You don't need to refer to the .INC file to use them. If I understand your scenario, you can simply use
assuming that each skin includes only one theme file (Theme1.inc, Theme2.inc, etc).
Also, you may already know this, but make sure that variables in your .INC files are actually given a Variables section, e.g.:
Code: Select all
SolidColor=#Color1#
Also, you may already know this, but make sure that variables in your .INC files are actually given a Variables section, e.g.:
Code: Select all
; Theme1.INI
[Variables]
Color1=255,255,255
-
- Posts: 478
- Joined: February 26th, 2011, 10:22 pm
Re: Trying to reference a specific duplicate variable
Unfortunately that's not what I'm trying to do.
There is #ExampleColor1# (of the same name) in 5 different .INC files.
In 1 skin, I have 5 boxes [ ] [ ] [ ] [ ] [ ]
Each box needs to contain an #ExampleColor1# from a different .INC file, but I can't simply reference the name, because they contradict.
I need to do something like this...
There is #ExampleColor1# (of the same name) in 5 different .INC files.
In 1 skin, I have 5 boxes [ ] [ ] [ ] [ ] [ ]
Each box needs to contain an #ExampleColor1# from a different .INC file, but I can't simply reference the name, because they contradict.
I need to do something like this...
Code: Select all
[Box1]
SolidColor=#ExampleColor1# "1.INC"
[Box2]
SolidColor=#ExampleColor1# "2.INC"
[Box3]
SolidColor=#ExampleColor1# "3.INC"
[Box4]
SolidColor=#ExampleColor1# "4.INC"
[Box5]
SolidColor=#ExampleColor1# "5.INC"
Droptop Four
Dropdown menu bar & app launcher for Windows & Rainmeter
Dropdown menu bar & app launcher for Windows & Rainmeter
-
- Posts: 35
- Joined: November 28th, 2012, 1:10 pm
- Location: Canada
Re: Trying to reference a specific duplicate variable
If I understand correctly I can think of a few workarounds, this seems like a settings skin?
It seems like you are reusing variables, which i'm not sure you can do. I thought .inc files are treated exactly as if they are in the same skin.
You could make a variable with the theme name in order to reference the right .inc file like:
Or you could rename the variables to something like Theme1Color1 and then reference them like:
Hope this helps, I'm currently sick so bear with me.
P.S. If this is for the Desktop+ skin have you checked out the new FileView Plugin?
It seems like you are reusing variables, which i'm not sure you can do. I thought .inc files are treated exactly as if they are in the same skin.
You could make a variable with the theme name in order to reference the right .inc file like:
Code: Select all
[Rainmeter]
[Variables]
Theme=MyCoolTheme
@include=#Theme#.inc
Code: Select all
[Box1]
SolidColor=#Theme1Color1#
[Box2]
SolidColor=#Theme2Color1#
[Box3]
SolidColor=#Theme3Color1#
[Box4]
SolidColor=#Theme4Color1#
[Box5]
SolidColor=#Theme5Color1#
P.S. If this is for the Desktop+ skin have you checked out the new FileView Plugin?