It is currently April 19th, 2024, 11:56 pm

Using !SetOption for inlinesetting or inlinepattern [solved]

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Using !SetOption for inlinesetting or inlinepattern [solved]

Post by CodeCode »

Hello, so I have two string meters, one shows temp Fahrenheit and the "F", the other shows temp Celsius and the"C".

Code: Select all

This is what I am trying:
Text= %1 C
InlineSetting=Color | #BigDriveAltColor#
InlinePattern=^.*  (.*)
It works great but I am having trouble in using a LeftMouseUpAction=[!SetOption MeterF InlineSetting ""][!Update]
The idea is to disable the inline lines for either meter so the "F" is highlighted but the "C" is not because the missing ("") parameter effectively disables the inlinepattern because it is what I presume to be a 'short circuit".

Thing is, the !SetOption does not seem to work with this form.
What am I not seeing with this? And how can I make it work?
Thanks.

My added presumption is that effectively both MeterC and MeterF would use the same regex.

EDIT sorry I changed my topic, I wrote it wrong and it was misleading.
Last edited by CodeCode on August 26th, 2021, 4:15 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Using !SetOption for inlinesetting or inlinepattern

Post by death.crafter »

CodeCode wrote: August 26th, 2021, 2:59 pm Hello, so I have two string meters, one shows temp Fahrenheit and the "F", the other shows temp Celsius and the"C".

Code: Select all

This is what I am trying:
Text= %1 C
InlineSetting=Color | #BigDriveAltColor#
InlinePattern=^.*  (.*)
It works great but I am having trouble in using a LeftMouseUpAction=[!SetOption MeterF InlineSetting ""][!Update]
The idea is to disable the inline lines for either meter so the "F" is highlighted but the "C" is not because the missing ("") parameter effectively disables the inlinepattern because it is what I presume to be a 'short circuit".

Thing is, the !SetOption does not seem to work with this form.
What am I not seeing with this? And how can I make it work?
Thanks.

My added presumption is that effectively both MeterC and MeterF would use the same regex.

EDIT sorry I changed my topic, I wrote it wrong and it was misleading.
Use "^$" instead
from the Realm of Death
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using !SetOption for inlinesetting or inlinepattern

Post by CodeCode »

Ok. I got it working. What I was trying to do is have either MeterC or MeterF have the color set for inlinesetting, change to colorsomething. I decided to use a variable. Then use !SetVariable to make the 'opposite' value not be color changed - essentially using the shortcircuit I mentioned above.

So, now when the unit changes, the selected unit symbol (F or C) will show the new color, and neutralising the 'other meter' to have a blank setting thus preventing that Unit symbol for having a, inlinepattern. Setting inlinepattern to empty string did not work, but setting inlinesetting to empty string does the job.

Code: Select all

[Variables]
UC=
UF=Color | 210,140,90,230
[MeterF]
Text= %1 F
InlineSetting=#UF#
InlinePattern=^.* (.*)

[MeterClick]
LeftMouseUpAction=[!SetVariable UF "Color | #BigDriveAltColor#"][!WriteKeyValue Variables UF "Color | #BigDriveAltColor#"][!SetVariable UC ""][!WriteKeyValue Variables UC ""]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.