It is currently March 28th, 2024, 10:10 am

SetVariable/Dynamic Variable Help

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
brijamelsh
Posts: 47
Joined: July 16th, 2010, 4:24 am

SetVariable/Dynamic Variable Help

Post by brijamelsh »

Im hoping someone sees something I'm not... this should be working, but it is not.

Code: Select all

[Variables]
.
.
.
SwatchSelect=1
Swatch1Select=["#ADDONSPATH#NirCmd\Nircmd.exe" inisetval "#SKINSPATH#ColorSet/GetUnderColor.ini" "ColorTarget" "ImageTint" "#Swatch1#"]["#ADDONSPATH#NirCmd\Nircmd.exe" inisetval "#SKINSPATH#ColorSet/GetUnderColor.ini" "SelectIcon" "LeftMouseUpAction" "!Execute #Swatch1Bang#"][!RainmeterActivateConfig ColorSet GetUnderColor.ini]

[DropperBtnOver]
Meter=Image
ImageName=..\img\dropper_over.png
W=18
H=18
X=20
Y=5
LeftMouseDoubleClickAction=!Execute #SwatchSelect#
DynamicVariables=1

[Swatch1]
Meter=Image
ImageName=..\img\swatch.png
ImageTint=#Swatch1#
W=11
H=37
X=48
Y=12
LeftMouseDownAction=!RainmeterSetVariable SwatchSelect #Swatch1Select#
So as you can probably see, there are multiple swatches you click to select, then you click the dropper to grab the color for that particular swatch... however as it stands, if you click the swatch then the dropper, it fails.

If I pull out the setvariable and just use #Swatch1Select# in place of #SwatchSelect# it works fine. However if I take out the set variable and use the same code as above except make SwatchSelect=#Swatch1Select#, it fails....

Thanks.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: SetVariable/Dynamic Variable Help

Post by JpsCrazy »

Dynamic Variables can not be used in the [Variables] section.

Straight from the Manual.
User avatar
brijamelsh
Posts: 47
Joined: July 16th, 2010, 4:24 am

Re: SetVariable/Dynamic Variable Help

Post by brijamelsh »

D'oh, well thats embarrassing, cant believe I didn't see that. Worked like a charm.

EDIT

Never mind, didn't work, I placed the variable in the Meter and its still failing.
User avatar
brijamelsh
Posts: 47
Joined: July 16th, 2010, 4:24 am

Re: SetVariable/Dynamic Variable Help

Post by brijamelsh »

Here's the current, non working code:

Code: Select all

[Variables]
.
.
.
Swatch1Select=["#ADDONSPATH#NirCmd\Nircmd.exe" inisetval "#SKINSPATH#ColorSet/GetUnderColor.ini" "ColorTarget" "ImageTint" "#Swatch1#"]["#ADDONSPATH#NirCmd\Nircmd.exe" inisetval "#SKINSPATH#ColorSet/GetUnderColor.ini" "SelectIcon" "LeftMouseUpAction" "!Execute #Swatch1Bang#"][!RainmeterActivateConfig ColorSet GetUnderColor.ini]

[DropperBtnOver]
Meter=Image
ImageName=..\img\dropper_over.png
SwatchSelect=1
W=18
H=18
X=20
Y=5
LeftMouseDoubleClickAction=!Execute #SwatchSelect#
DynamicVariables=1

[Swatch1]
Meter=Image
ImageName=..\img\swatch.png
ImageTint=#Swatch1#
W=11
H=37
X=48
Y=12
LeftMouseDownAction=!RainmeterSetVariable SwatchSelect #Swatch1Select#
User avatar
brijamelsh
Posts: 47
Joined: July 16th, 2010, 4:24 am

Re: SetVariable/Dynamic Variable Help

Post by brijamelsh »

shameless bump.
User avatar
Varelse
Posts: 61
Joined: April 22nd, 2009, 7:46 pm

Re: SetVariable/Dynamic Variable Help

Post by Varelse »

You need DynamicVariables on [Swatch1]. I'm 95% sure you don't need it on [DropperBtnOver]. DynamicVariables are needed on the meters and measures affected by Variable changes. Not on the measures or meters that change variables.
Post Reply