Page 3 of 6

Re: Disabled option in meters

Posted: April 12th, 2018, 1:52 pm
by fonpaolo
balala wrote:The above !SetOption gives an Error: Cannot replace variable with itself "" message in the log, while SomeAction=[!SetOption SomeMeter LeftMouseUpAction ""] doesn't. I'd say it's better to use the second form of the action, without the brackets.
I'm always using this """[]""" and I never had problems.

Re: Disabled option in meters

Posted: April 12th, 2018, 1:53 pm
by balala
jsmorley wrote:I'll have to look at that.
Please do.
jsmorley wrote:The issue is that LeftMouseUpAction="" means something entirely different than LeftMouseUpAction=[].
What's the difference?

Re: Disabled option in meters

Posted: April 12th, 2018, 1:54 pm
by balala
fonpaolo wrote:I'm always using this """[]""" and I never had problems.
Are you using this: """[]""", or this: "[]"?

Re: Disabled option in meters

Posted: April 12th, 2018, 1:55 pm
by jsmorley
balala wrote:Please do.

What's the difference?
One means "there is no mouse action" and the other means "there is a mouse action that doesn't do anything". This has implications when there are mouse actions on different meters that "overlap", or if there are mouse actions on the "skin".

Re: Disabled option in meters

Posted: April 12th, 2018, 1:55 pm
by fonpaolo
I can think that [] is "no command" and "" is "nothing at all"...

Re: Disabled option in meters

Posted: April 12th, 2018, 1:56 pm
by fonpaolo
balala wrote:Are you using this: """[]""", or this: "[]"?
Always the first.
Since it's a command, even if empty, I always use magic quotes.

Re: Disabled option in meters

Posted: April 12th, 2018, 2:09 pm
by jsmorley
fonpaolo wrote:Always the first.
Since it's a command, even if empty, I always use magic quotes.
The problem is really that it is seen as a null [section variable] in the context of the string, not a command as such. The magic quotes solves that.

I could argue that this is another advantage of !DisableMouse, which isn't going to be literally trying to set "[]" as the value of the action option.

Re: Disabled option in meters

Posted: April 12th, 2018, 2:45 pm
by balala
jsmorley wrote:The problem is really that it is seen as a null [section variable] in the context of the string, not a command as such. The magic quotes solves that.
No, I'm sorry but they don't. Both the following options produce the same error message:
LeftMouseUpAction=[!SetVariable MyMeter LeftMouseUpAction """[]"""]
LeftMouseUpAction=[!SetVariable MyMeter LeftMouseUpAction "[]"]

Re: Disabled option in meters

Posted: April 12th, 2018, 2:49 pm
by jsmorley
balala wrote:No, I'm sorry but they don't. Both the following options produce the same error message:
LeftMouseUpAction=[!SetVariable MyMeter LeftMouseUpAction """[]"""]
LeftMouseUpAction=[!SetVariable MyMeter LeftMouseUpAction "[]"]
Doesn't for me... And I'm pretty sure you don't mean "!SetVariable".

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeterOne]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello world
MouseOverAction=[!SetOption MeterOne FontSize "15"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption MeterOne FontSize "11"][!UpdateMeter *][!Redraw]

[MeterTwo]
Meter=String
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click Me
LeftMouseUpAction=[!SetOption MeterOne MouseOverAction """[]"""][!UpdateMeter *][!Redraw]

Re: Disabled option in meters

Posted: April 12th, 2018, 2:58 pm
by balala
jsmorley wrote:Doesn't for me... And I'm pretty sure you don't mean "!SetVariable".

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeterOne]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello world
MouseOverAction=[!SetOption MeterOne FontSize "15"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption MeterOne FontSize "11"][!UpdateMeter *][!Redraw]

[MeterTwo]
Meter=String
Y=5R
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click Me
LeftMouseUpAction=[!SetOption MeterOne MouseOverAction """[]"""][!UpdateMeter *][!Redraw]
When I click the Click me string meter, I get in the log an Error: Cannot replace variable with itself "" message.