I'm always using this """[]""" and I never had problems.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.
It is currently March 28th, 2024, 12:17 pm
Disabled option in meters
Re: Disabled option in meters
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Disabled option in meters
Please do.jsmorley wrote:I'll have to look at that.
What's the difference?jsmorley wrote:The issue is that LeftMouseUpAction="" means something entirely different than LeftMouseUpAction=[].
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Disabled option in meters
Are you using this: """[]""", or this: "[]"?fonpaolo wrote:I'm always using this """[]""" and I never had problems.
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Disabled option in meters
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".balala wrote:Please do.
What's the difference?
Re: Disabled option in meters
I can think that [] is "no command" and "" is "nothing at all"...
Re: Disabled option in meters
Always the first.balala wrote:Are you using this: """[]""", or this: "[]"?
Since it's a command, even if empty, I always use magic quotes.
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Disabled option in meters
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.fonpaolo wrote:Always the first.
Since it's a command, even if empty, I always use magic quotes.
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.
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Disabled option in meters
No, I'm sorry but they don't. Both the following options produce the same error message: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.
LeftMouseUpAction=[!SetVariable MyMeter LeftMouseUpAction """[]"""]
LeftMouseUpAction=[!SetVariable MyMeter LeftMouseUpAction "[]"]
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Disabled option in meters
Doesn't for me... And I'm pretty sure you don't mean "!SetVariable".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 "[]"]
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]
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Disabled option in meters
When I click the Click me string meter, I get in the log an Error: Cannot replace variable with itself "" message.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]