It is currently March 29th, 2024, 2:22 pm

"Updating" a measure in one skin from another.

Get help with creating, editing & fixing problems with skins
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

"Updating" a measure in one skin from another.

Post by StArL0rd84 »

Making a settings skin to control the main skin im working on.
Based on the changes im making in the settings skin i want the measure inside the main skin to update.
It all works with a refresh to the main skin, but i would like to avoid that if i could.
I thought something like this would work: [!UpdateMeasure "Measure" "(Config)"] But it doesn't.
halpmeh.png
Meters in Settings skin:

Code: Select all

[Arrows]
 Meter=Image
 ImageName=#@#Images\Arrows.png
 DynamicVariables=1
 X=180
 Y=111
 Hidden=1
 Group=Content
 
[Increase]
 Meter=Image
 SolidColor=0,0,0,1
 MouseOverAction=[!SetOption NumberOfShows FontColor #FontColor2#][!UpdateMeter *][!Redraw]
 MouseLeaveAction=[!SetOption NumberOfShows FontColor #FontColor1#][!UpdateMeter *][!Redraw]
 LeftMouseUpAction=[!SetVariable NumberOfShows "(#NumberOfShows#+1)"][!WriteKeyValue Variables NumberOfShows "(#NumberOfShows#+1)" "#Var#"][!UpdateMeter *][!Redraw][!Refresh ShowRSS\ShowRSS]
 DynamicVariables=1
 X=r
 Y=r
 W=20
 H=17
 
[Decrease]
 Meter=Image
 SolidColor=0,0,0,1
 MouseOverAction=[!SetOption NumberOfShows FontColor #FontColor2#][!UpdateMeter *][!Redraw]
 MouseLeaveAction=[!SetOption NumberOfShows FontColor #FontColor1#][!UpdateMeter *][!Redraw]
 LeftMouseUpAction=[!SetVariable NumberOfShows "(#NumberOfShows#-1)"][!WriteKeyValue Variables NumberOfShows "(#NumberOfShows#-1)" "#Var#"][!UpdateMeter *][!Redraw][!Refresh ShowRSS\ShowRSS]
 DynamicVariables=1
 X=r
 Y=27r
 W=20
 H=17
Variable in #@#Variables\Variables.inc

Code: Select all

NumberOfShows=4
Measure in main skin:

Code: Select all

[mNumberOfShows]
 Measure=Calc
 Formula=#NumberOfShows#
 DynamicVariables=1
 IfCondition=(mNumberOfShows = 1)
 IfTrueAction=SomeAction1
 IfCondition2=(mNumberOfShows = 2)
 IfTrueAction2=SomeAction2
You do not have the required permissions to view the files attached to this post.
Last edited by StArL0rd84 on July 11th, 2017, 5:44 pm, edited 1 time in total.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: "Updating" a measure in one skin from another.

Post by jsmorley »

SomeAction=[!UpdateMeasure "MeasureName" "ConfigName"] most assuredly does work...

Generally when there is a problem like that, it's because you are not defining "ConfigName" correctly. Double check this:

https://docs.rainmeter.net/manual/skins/#Config
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: "Updating" a measure in one skin from another.

Post by StArL0rd84 »

jsmorley wrote:SomeAction=[!UpdateMeasure "MeasureName" "ConfigName"] most assuredly does work...
Managed to use SetOption instead since UpdateMeasure had no effect, even inside the main skin.

[!UpdateMeasure "mNumberOfShows" "ShowRSS\ShowRSS"]

[!SetOption "mNumberOfShows" "Formula" "(#NumberOfShows#+1)" "ShowRSS\ShowRSS"]
ezgif.com-video-to-gif.gif
You do not have the required permissions to view the files attached to this post.
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))