Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1407

Help: Rainmeter Skins • Re: !CommandMeasure "MeasureName" not found

$
0
0
So I have an image being used as a button in one skin to try and trigger a sliding skin but nothing happens when clicked and rainmeter's logs say the measure cannot be found. My brain is fried, please help.
Your brain shouldn't be fried, because it's logical that your "Skin A" doesn't see any measure called "MeasureSliderUpwards" for the simple reason that the latter belongs to another skin, aka "Skin B" (they're different skins / files, you know). However, it is possible to control stuff in another skin from the current skin, see the first Note here:
https://docs.rainmeter.net/manual/bangs/

Other than that, your "Skin B" isn't doing anything either, because the OffSet variable being initially 0 and SlideUp repeatedly subtracting 30 from the variable, although you should get negative values for the said variable, you won't since its value is clamped to be greater than 0 in that formula. A proper way to implement the original code is like this (replace "Test" and "Test2" with the config names of your "Skin A" and "Skin B", respectively)...

Test.ini:

Code:

[Variables]State=1[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1---Measures---[MeterName]Meter=ImageImageName=0.pngH=105W=1920PreserveAspectRatio=0---Meters---[MeterShowPicture1]Meter=ImageImageName=sse.pngX=916Y=0W=110H=110PreserveAspectRatio=1LeftMouseUpAction=[!CommandMeasure MeasureSliderUpwards "Execute #State#" "Test2"]DynamicVariables=1
Test2.ini:

Code:

[Variables]OffSet=0State=1U=[!UpdateMeasure MeasureSliderUpwards][!UpdateMeter *][!Redraw][Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1---Measures---[MeasureSliderUpwards]Measure=PluginPlugin=ActionTimerActionList1=Repeat SlideUp, 2, 22SlideUp=[!SetVariable State 2][!SetVariable State 2 "Test"][!SetVariable OffSet (Clamp(#OffSet#-30,-500,0))]#U#ActionList2=Repeat SlideDown, 2, 22SlideDown=[!SetVariable State 1][!SetVariable State 1 "Test"][!SetVariable OffSet (Clamp(#OffSet#+30,-500,0))]#U#DynamicVariables=1---Meters---[MeterImage]Meter=ImageImageName=0.pngX=0Y=#OffSet#W=450H=705LeftMouseUpAction=[!CommandMeasure MeasureSliderUpwards "Execute #State#"]DynamicVariables=1
This will allow you to slide the image in "Skin B" / "Test2" from both skins in a similar manner. Besides adjusting the clamping in "Skin B" / "Test2" to actually do something visually, the key here was using the optional Config parameter in most of the bangs.

That being said, I'm pretty sure this is not exactly what you want. If you want to slide the actual "Skin B" / "Test2" skin from "Skin A" / "Test" - and not just the image in "Skin B" / "Test2" - then you'll probably have to take a look and use the !Move bang to reposition "Skin B" / "Test2" from an ActionTimer measure in "Skin A" / "Test":
https://docs.rainmeter.net/manual/bangs/#Move

So, it's not so much about the brain being fried, but about being a bit confused about how things work and what exactly you'd like to achieve. ;-)

Statistics: Posted by Yincognito — Today, 7:19 pm



Viewing all articles
Browse latest Browse all 1407

Trending Articles