Page 1 of 1

SetVariable/Dynamic Variable Help

Posted: August 8th, 2010, 3:11 am
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.

Re: SetVariable/Dynamic Variable Help

Posted: August 8th, 2010, 3:18 am
by JpsCrazy
Dynamic Variables can not be used in the [Variables] section.

Straight from the Manual.

Re: SetVariable/Dynamic Variable Help

Posted: August 8th, 2010, 3:36 am
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.

Re: SetVariable/Dynamic Variable Help

Posted: August 8th, 2010, 3:46 am
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#

Re: SetVariable/Dynamic Variable Help

Posted: August 11th, 2010, 3:35 am
by brijamelsh
shameless bump.

Re: SetVariable/Dynamic Variable Help

Posted: August 11th, 2010, 4:40 am
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.