It is currently April 24th, 2024, 3:54 pm

Group1 | Group2 ToggleMeterGroup and on/off Status

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

Hi, I have a few little Meter widgets build into a Hud display.

The display main image can be toggled on or off.

Works nicely.

Thing is the state of the widgets, as they are the Meters with the multiple Group associations, dont remain off or on when the main Hud is toggled.

Ok from initial load of Rainmeter, HUD = on, Widgets = on | turn off widgets, HUD stays on. Yay. In that state, if I toggle the HUD off, the widgets toggle on. It just doesnt gel with what I had hoped. So, in that state I am endeavouring to have the widgets stay off, or on if the main HUD is either off, or on. Whilst still being able to toggle that whole thing off with the Top1 Meter.

Can it be done?

Code: Select all

[World]
Meter=Image
ImageName=#@#Home.png
ImageTint=#Scanner#
X=1620
Y=920
W=310
H=146
DynamicVariables=1
Group=Home | ExtHUD
Hidden=1

[WorldCalc]
Measure=Calc
Formula=Counter%89
DynamicVariables=1

[InfoWorld]
Meter=Image
ImageName="#@#Info\inf[WorldCalc].png"
ImageTint=#Scanner#
AntiAlias=1
X=1800
Y=865
W=80
H=63
DynamicVariables=1
Group=Home | ExtHUD
Hidden=1

;==========================================End HUDSUP
;=======================================Begin Buttons

[Top1]
Meter=Image
SolidColor=0,0,0,1
X=550
Y=80
H=40
W=40
ToolTipText="Extended HUD"
ToolTipType=1
LeftMouseDownAction=[!ToggleMeterGroup "ExtHUD"]

;=====================================================

[Top2]
Meter=Image
SolidColor=0,0,0,1
X=615
Y=80
H=40
W=40
ToolTipText="GPU HUD"
ToolTipType=1
LeftMouseDownAction=[!ToggleMeterGroup "GPUHUD"]

;=====================================================
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

I just read that. But I didn't want to confuse the original question.

That said, it looks like I will just have to add another Meter for this to be possible?
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

I have been trying to use an IfCondition, but I am having trouble sussing out how the condition should look.

Code: Select all

[Lithium]
Meter=Image
ImageName="#@#Lithium\li[LithiumCalc].png"
ImageTint=#Scanner#
AntiAlias=1
X=15
Y=950
W=125
H=110
DynamicVariables=1
Group=Atomic | ExtHUD
IfCondition=Top1 = Hidden
IfTrueAction=[!ToggleGroup "Atomic"]
Hidden=1
I am just terrible at linear logic :oops:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16166
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by balala »

Mor3bane wrote:I have been trying to use an IfCondition, but I am having trouble sussing out how the condition should look.
The IfConditions can't be used on meters, just on measures.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

balala wrote:The IfConditions can't be used on meters, just on measures.
Any recommendations? I'm stumped.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

I'm looking at lua - however, I have only the Snippets section of the manual to go by.

Still stumped.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16166
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by balala »

Mor3bane wrote:I'm looking at lua - however, I have only the Snippets section of the manual to go by.
Don't think it's needed.
Mor3bane wrote:Any recommendations? I'm stumped.
Don't know. Depends on your code. But you didn't post it, on the first code you've posted above a [Lithium] meter doesn't exists. So, I'm not sure what to recommend, but anyway, you have to move the IfCondition / IfTrueAction options to a measure.

And you can't check this way if a meter is hidden.

To check a such thing, I'd recommend the followings: first you have to know that the width and height of a hidden meter are set to 0, both. So, you could check the values of these two options. Add the following measure:

Code: Select all

[MeasureTop1]
Measure=Calc
Formula=( [Top1:W] + [Top1:H] )
DynamicVariables=1
Then add the posted IfCondition options to this measure (modifying them appropriately):

Code: Select all

[MeasureTop1]
...
IfCondition=(MeasureTop1=0)
IfTrueAction=[!ToggleGroup "Atomic"]
This should work, because when the [Top1] meter is hidden, its width and height become 0, so the value returned by the [MeasureTop1] measure is 0 as well, so the IftrueAction is executed. When the meter is shown, the IfTrueAction isn't executed, because the condition isn't met.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

balala wrote:Don't think it's needed.

Don't know. Depends on your code. But you didn't post it, on the first code you've posted above a [Lithium] meter doesn't exists. So, I'm not sure what to recommend, but anyway, you have to move the IfCondition / IfTrueAction options to a measure.

And you can't check this way if a meter is hidden.

To check a such thing, I'd recommend the followings: first you have to know that the width and height of a hidden meter are set to 0, both. So, you could check the values of these two options. Add the following measure:

Code: Select all

[MeasureTop1]
Measure=Calc
Formula=( [Top1:W] + [Top1:H] )
DynamicVariables=1
Then add the posted IfCondition options to this measure (modifying them appropriately):

Code: Select all

[MeasureTop1]
...
IfCondition=(MeasureTop1=0)
IfTrueAction=[!ToggleGroup "Atomic"]
This should work, because when the [Top1] meter is hidden, its width and height become 0, so the value returned by the [MeasureTop1] measure is 0 as well, so the IftrueAction is executed. When the meter is shown, the IfTrueAction isn't executed, because the condition isn't met.
Hmm, I'll give that a try.

I was also thinking something like this:

Code: Select all

[InfoPath]
Meter=Image
MeterStyle=MeasureSwitch
ImageName="#@#Info\inf[InfoCalc].png"
ImageTint=#Scanner#
AntiAlias=1
X=125
Y=970
W=80
H=63
DynamicVariables=1
Group=Atomic | ExtHUD
Hidden=1

[MeasureSwitch]
Measure=Calc
Formula=Top1 ? 0 : 0
Very likely I am way off.
I will let you know how your version using Calc goes.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

balala wrote:Don't think it's needed.

Don't know. Depends on your code. But you didn't post it, on the first code you've posted above a [Lithium] meter doesn't exists. So, I'm not sure what to recommend, but anyway, you have to move the IfCondition / IfTrueAction options to a measure.

And you can't check this way if a meter is hidden.

To check a such thing, I'd recommend the followings: first you have to know that the width and height of a hidden meter are set to 0, both. So, you could check the values of these two options. Add the following measure:

Code: Select all

[MeasureTop1]
Measure=Calc
Formula=( [Top1:W] + [Top1:H] )
DynamicVariables=1
Then add the posted IfCondition options to this measure (modifying them appropriately):

Code: Select all

[MeasureTop1]
...
IfCondition=(MeasureTop1=0)
IfTrueAction=[!ToggleGroup "Atomic"]
This should work, because when the [Top1] meter is hidden, its width and height become 0, so the value returned by the [MeasureTop1] measure is 0 as well, so the IftrueAction is executed. When the meter is shown, the IfTrueAction isn't executed, because the condition isn't met.

Code: Select all

[LithiumCalc]
Measure=Calc
Formula=Counter%43
DynamicVariables=1

[Lithium]
Meter=Image
ImageName="#@#Lithium\li[LithiumCalc].png"
ImageTint=#Scanner#
AntiAlias=1
X=15
Y=950
W=125
H=110
DynamicVariables=1
Group=Atomic | ExtHUD
Hidden=1

[InfoCalc]
Measure=Calc
Formula=Counter%89
DynamicVariables=1

[InfoPath]
Meter=Image
ImageName="#@#Info\inf[InfoCalc].png"
ImageTint=#Scanner#
AntiAlias=1
X=125
Y=970
W=80
H=63
DynamicVariables=1
Group=Atomic | ExtHUD
Hidden=1

[MeasureTop1]<------Where does this actually get called from? Does it function independently?
Measure=Calc
Formula=( [Top1:W] + [Top1:H] )
DynamicVariables=1
IfCondition=(MeasureTop1=0)
IfTrueAction=[!ToggleGroup "Atomic"]


[Top1]
Meter=Image
SolidColor=0,0,0,1
X=550
Y=80
H=40
W=40
ToolTipText="Extended HUD"
ToolTipType=1
LeftMouseDownAction=[!ToggleMeterGroup "ExtHUD"]
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

My apologies.

I got it now. :bow:

Thanks @balala - your advice is much appreciated, and MeasureTop1 works perfectly.

:great: :rosegift: :thumbup:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.