It is currently April 23rd, 2024, 8:23 pm

Is that a bug or a feature (or even a MUST ???)

Report bugs with the Rainmeter application and suggest features.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Is that a bug or a feature (or even a MUST ???)

Post by Youkai1977 »

When writing my skins I noticed several times that the order of things that are listed under [Variables] is decisive for whether something ultimately works or not. This can be really frustrating at times when troubleshooting.

Here is an example (1):

Code: Select all

[Variables]
Alpha1=170
Alpha2=80
Alpha3=230
Color1=0,78,195,
Color2=17,207,255,
Color3=164,164,164,
Color5=68,118,255,
Color8=255,0,0,
Color9=165,0,0,
GColor_1=GradientColor | 90 | #Color1##Alpha3# ; 1.0 | #Color2##Alpha3# ; 0.5
SColor_1=Shadow | 0 | 0 | 2.5 | #Color5##Alpha1#
GColor_2=GradientColor | 270 | #Color3##Alpha3# ; 0.5 | #Color4##Alpha3# ; 1.0
SColor_2=Shadow | 0 | 0 | 2.5 | #Color3##Alpha1#
GColor_3=GradientColor | 90 | #Color7##Alpha2# ; 1.0 | #Color8##Alpha2# ; 0.5
SColor_3=Shadow | 0 | 0 | 2.5 | #Color9##Alpha1#
In example (1), the color or alpha data is transferred to the GColor_1 or SColor_1 variable.

Example (2):

Code: Select all

[Variables]
Alpha1=170
Alpha2=80
Alpha3=230
GColor_1=GradientColor | 90 | #Color1##Alpha3# ; 1.0 | #Color2##Alpha3# ; 0.5
SColor_1=Shadow | 0 | 0 | 2.5 | #Color5##Alpha1#
GColor_2=GradientColor | 270 | #Color3##Alpha3# ; 0.5 | #Color4##Alpha3# ; 1.0
SColor_2=Shadow | 0 | 0 | 2.5 | #Color3##Alpha1#
GColor_3=GradientColor | 90 | #Color7##Alpha2# ; 1.0 | #Color8##Alpha2# ; 0.5
SColor_3=Shadow | 0 | 0 | 2.5 | #Color9##Alpha1#
Color1=0,78,195,
Color2=17,207,255,
Color3=164,164,164,
Color5=68,118,255,
Color8=255,0,0,
Color9=165,0,0,
In this example (2) the variables from Color1, Color2 etc. are not transferred to the variables GColor_1 or SColor_1 and the corresponding meter, which needs these values, goes out according to value / colorless.
It's really annoying when you spend hours looking for the bug (if that's one).

Hence my question .... is this a bug in Rainmeter, a feature, or even a MUST ???
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Is that a bug or a feature (or even a MUST ???)

Post by Active Colors »

Youkai1977 wrote: January 28th, 2021, 7:33 pm When writing my skins I noticed several times that the order of things that are listed under [Variables] is decisive for whether something ultimately works or not. This can be really frustrating at times when troubleshooting.

Here is an example (1):

Code: Select all

[Variables]
Alpha1=170
Alpha2=80
Alpha3=230
Color1=0,78,195,
Color2=17,207,255,
Color3=164,164,164,
Color5=68,118,255,
Color8=255,0,0,
Color9=165,0,0,
GColor_1=GradientColor | 90 | #Color1##Alpha3# ; 1.0 | #Color2##Alpha3# ; 0.5
SColor_1=Shadow | 0 | 0 | 2.5 | #Color5##Alpha1#
GColor_2=GradientColor | 270 | #Color3##Alpha3# ; 0.5 | #Color4##Alpha3# ; 1.0
SColor_2=Shadow | 0 | 0 | 2.5 | #Color3##Alpha1#
GColor_3=GradientColor | 90 | #Color7##Alpha2# ; 1.0 | #Color8##Alpha2# ; 0.5
SColor_3=Shadow | 0 | 0 | 2.5 | #Color9##Alpha1#
In example (1), the color or alpha data is transferred to the GColor_1 or SColor_1 variable.

Example (2):

Code: Select all

[Variables]
Alpha1=170
Alpha2=80
Alpha3=230
GColor_1=GradientColor | 90 | #Color1##Alpha3# ; 1.0 | #Color2##Alpha3# ; 0.5
SColor_1=Shadow | 0 | 0 | 2.5 | #Color5##Alpha1#
GColor_2=GradientColor | 270 | #Color3##Alpha3# ; 0.5 | #Color4##Alpha3# ; 1.0
SColor_2=Shadow | 0 | 0 | 2.5 | #Color3##Alpha1#
GColor_3=GradientColor | 90 | #Color7##Alpha2# ; 1.0 | #Color8##Alpha2# ; 0.5
SColor_3=Shadow | 0 | 0 | 2.5 | #Color9##Alpha1#
Color1=0,78,195,
Color2=17,207,255,
Color3=164,164,164,
Color5=68,118,255,
Color8=255,0,0,
Color9=165,0,0,
In this example (2) the variables from Color1, Color2 etc. are not transferred to the variables GColor_1 or SColor_1 and the corresponding meter, which needs these values, goes out according to value / colorless.
It's really annoying when you spend hours looking for the bug (if that's one).

Hence my question .... is this a bug in Rainmeter, a feature, or even a MUST ???
No it is not a bug. Since you have variables in variables, the load order matters. If you don't declare a value for your variable in a variable before it loads then it is treated like a usual string #Color1#, but if you do declare it before it loads then #Color1# will become the value you have declared before your variable in a variable.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Is that a bug or a feature (or even a MUST ???)

Post by Youkai1977 »

Ok, even if you explained it to me in English, it was still very understandable. Even I understood that immediately * lol * :oops:

In short, not a bug, but logical.

Well, I already said it in another thread, I think I'm doing my doctorate in Chinese. It's easier to understand than some of the Rainmeter syntax.

In any case, thanks again for the simple and understandable explanation :thumbup:
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl: