It is currently April 26th, 2024, 9:57 am

How to hide Meter in other ini file

Get help with creating, editing & fixing problems with skins
gkmaz9
Posts: 67
Joined: August 26th, 2019, 10:42 am

How to hide Meter in other ini file

Post by gkmaz9 »

Every time I make it, every time I don't know it, something happens. Please help.

I try to Hide the Meter in the test2.ini file by writing something in IfAction in test1.
But it doesn't work.
What should I write in IfAction?


test1.ini in test folder

Code: Select all

[Rainmeter]
Update=1000

[Variables]

[Measuretest]
Measure=Time
Format=%H
IfCondition=(#CurrentMeasure#=3)
IfTrueAction=[!SetOption MeterBox Hidden 2 "test\test2" "test2.ini"]
IfFalseAction=[!SetOption MeterBox Hidden 0 "test\test2" "test2.ini"]

[MeterBox0]
Meter=String
X=0
Y=0
W=100
H=100
SolidColor=255,255,255
test2\test2.ini in test folder

Code: Select all

[Rainmeter]
Update=1000

[Variables]

[MeterBox]
Meter=String
X=30
Y=20
W=100
H=100
SolidColor=255,255,255
Last edited by gkmaz9 on February 22nd, 2020, 10:33 am, edited 6 times in total.
User avatar
Jeff
Posts: 332
Joined: September 3rd, 2018, 11:18 am

Re: How to hide Meter in other ini file

Post by Jeff »

https://docs.rainmeter.net/manual/bangs/#ShowHideToggleMeter

Just write the correct config path. Easiest way to find it is by right clicking a skin and copying the very first option
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: How to hide Meter in other ini file

Post by mak_kawa »

Hi gkmaz9

1. Your !SetOption bang has too many parameters. Ini file name is not neccesry.
2. Hidden= option value is 0 and 1. Maybe 2 works as "not 0". But if so, not recommended.

And...as Jeff suggested, !Toggle/HideMeter bang is better than changing Hidden option by !SetOption, because of its "intuitiveness", I think.

Config name is sometimes confusing (especially absolute/relative path at least for me!). So, it is better to write using the way as Jeff said.
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to hide Meter in other ini file

Post by balala »

mak_kawa wrote: February 22nd, 2020, 10:38 am Config name is sometimes confusing (especially absolute/relative path at least for me!). So, it is better to write using the way as Jeff said.
Right. Note that a common mistake is using the name / path of the .ini file in bangs which need this parameter, instead of config name. Rainmeter identifies the skin through their config. Not needed to specify the name of the .ini file, since from one config only one single .ini file can be loaded at a time. That's why Rainmeter doesn't care about the name of the .ini file. In this case the name of the config is test\test2 I suppose, assuming the skins .ini file is Skins\test\test2\test2.ini.
One more: instead of setting the Hidden option of the meter which has to be hidden to 1, hiding it with the !HideMeter bang is much more comfortable, as mak_kawa suggested. Much more intuitive (my opinion).
So taking into account both of above comments, the IfTrueAction and IfFalseAction options of the [Measuretest] measure should look like this:

Code: Select all

[Measuretest]
...
IfTrueAction=[!HideMeter "MeterBox" "test\test2"][!Redraw]
IfFalseAction=[!ShowMeter "MeterBox" "test\test2"][!Redraw]
Note that beside hiding / showing the meter (with the !HideMeter / !ShowMeter bangs), I also added a [!Redraw] bang, to make the hiding / showing instantaneous.
I can't see how !ToggleMeter could be used in this case. Depending on the hour, the meter should be hidden / shown.
mak_kawa wrote: February 22nd, 2020, 10:38 am 2. Hidden= option value is 0 and 1. Maybe 2 works as "not 0". But if so, not recommended.
Setting the Hiddden option to 2 is good and it hides the meter. Maybe not the best practice, but it does definitely work. Any value above 0 is good, hides the meter. This isn't a problem.