It is currently March 28th, 2024, 12:17 pm

Disabled option in meters

Report bugs with the Rainmeter application and suggest features.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Disabled option in meters

Post 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.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Disabled option in meters

Post 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?
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Disabled option in meters

Post by balala »

fonpaolo wrote:I'm always using this """[]""" and I never had problems.
Are you using this: """[]""", or this: "[]"?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Disabled option in meters

Post 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".
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Disabled option in meters

Post by fonpaolo »

I can think that [] is "no command" and "" is "nothing at all"...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Disabled option in meters

Post 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.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Disabled option in meters

Post 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.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Disabled option in meters

Post 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 "[]"]
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Disabled option in meters

Post 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]
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Disabled option in meters

Post 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.
Post Reply