It is currently April 28th, 2024, 4:08 pm

Quotation marks in a value

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Quotation marks in a value

Post by balala »

Hello,

I have to use SetOption bang in a skin, but the value which I have to set contain quotation marks. It looks like this:

!SetOption MeterAction1 LeftMouseDownAction "!Execute [!ShowMeter MeterAction2][!HideMeter MeterAction1][!SetVariable Act "exitwin poweroff"]"

The double quotation marks gives error. If I include both: the value and the exitwin poweroff between quotation marks, the bang doesn't work. Is there any possibility to use a quotation mark in the value? Or any other idea, how can be included the quotation marks in a value, that contains also spaces?

Thank you,
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Quotation marks in a value

Post by Kaelri »

You can use "magic quotes" to contain the whole parameter:

Code: Select all

!SetOption MeterAction1 LeftMouseDownAction """[!ShowMeter MeterAction2][!HideMeter MeterAction1][!SetVariable Act "exitwin poweroff"]"""
User avatar
balala
Rainmeter Sage
Posts: 16183
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Quotation marks in a value

Post by balala »

Thank you, that was what I looked for.