It is currently June 16th, 2021, 10:21 am

[BUG]CommandMeasure bang works with disabled measures

Report bugs with the Rainmeter application and suggest features.
User avatar
death.crafter
Posts: 175
Joined: April 24th, 2021, 8:13 pm

[BUG]CommandMeasure bang works with disabled measures

Post by death.crafter »

I noticed when I was trying to do a certain thing that the !CommandMeasure bang also works with disabled measures, which should not be the case. Here is the code from an example skin(attached below):

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[String]
Meter=String
Text=InputText
FontFace=Segoe UI
FontColor=FFFFFE
SolidColor=30,30,30,200
FontSize=30
AntiAlias=1
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure InputText "ExecuteBatch 1"]

[InputText]
Measure=Plugin
Plugin=InputText
SolidColor=202020
FontColor=255,255,255
FontFace=Segoe UI
FontSize=30
StringAlign=Left
DynamicVariables=1
W=[String:W]
H=[String:H]
X=[String:X]
Y=[String:Y]
DefaultValue=""
Command1=[!Log $UserInput$]
Disabled=1

[String2]
Meter=String
Y=10R
Text=Logs true through Lua
FontFace=Segoe UI
FontColor=FFFFFE
SolidColor=30,30,30,200
FontSize=30
AntiAlias=1
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure OtherMeasure xy()]

[OtherMeasure]
Measure=Script
ScriptFile=test.lua
Disabled=1
Skin:
CommandMeasureBug_1.00.rmskin
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
User avatar
Brian
Developer
Posts: 2140
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [BUG]CommandMeasure bang works with disabled measures

Post by Brian »

Strictly speaking, a disabled measure just means it will not be updated during the update cycle and its number value will be 0 (not its string value though). There is nothing in the docs about a disabled measure not reacting to a !CommandMeasure bang, although it does make logical sense that the bang should not be executed.

Unfortunately due to backwards compatibility issues, this cannot be fixed.

-Brian