It is currently April 24th, 2024, 9:30 am

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

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

For those who may be interested:

Code: Select all

[InfoPath]
Meter=Image
MeasureName=MeasureTop1<------I was only typing Measure=xxx NOT MeasureName=xxx  :oops: 
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]
Measure=Calc
Formula=( [Lithium:W] + [Lithium:H] )
DynamicVariables=1
IfCondition=(Lithium=0)
IfTrueAction=[!ToggleGroup "Atomic"]
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: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by balala »

Mor3bane wrote:

Code: Select all

[MeasureTop1]
Measure=Calc
Formula=( [Lithium:W] + [Lithium:H] )
DynamicVariables=1
IfCondition=(Lithium=0)
IfTrueAction=[!ToggleGroup "Atomic"]
Are you sure this is working? Because Lithium is a meter, so an IfCondition=(Lithium=0) option doesn't has too much sense.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by jsmorley »

Meters have no value. You can never test the value of a meter.
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:Are you sure this is working? Because Lithium is a meter, so an IfCondition=(Lithium=0) option doesn't has too much sense.
jsmorley wrote:Meters have no value. You can never test the value of a meter.
At first glance it seemed it was working.
All it did was disable the Meter when the Top1 meter was toggled. So seeing that, it looked good. But the meter that toggles the image meter no longer functions either, making the progress bittersweet.

So given that testing a Meter is as useful as dividing by zero, I am not sure how my problem can be solved.
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 »

Hi, I am fairly certain this is all of the relevant code.

Lithiumand InfoPath are image meters that are Toggled by Lower6, and are Grouped as Atomic

Top 1 is meant to Toggle a HUD display that is a Group of Image Meters Grouped as ExtHUD, along with the MeterGroup Atomic

My wish is to make Top1 smart enough to know when the Atomic Group is on or off, and Toggle appropriately in tune with Group ExtHUD by understanding if Atomic is off it stays off, and if Atomic is on, it Toggles off as well - or back on - appropriately.

Code: Select all

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

[Lithium]
Meter=Image
MeasureName=MeasureTop1
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
MeasureName=MeasureTop1
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]
Measure=Calc
Formula=( [Lithium:W] + [Lithium:H] )
DynamicVariables=1
IfCondition=(Lithium=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"]

[Lower6]
Meter=Image
MeasureName=MeasureLower6
SolidColor=0,0,0,1
X=880
Y=965
H=40
W=40
ToolTipText="Atomic Scan"
ToolTipType=1
LeftMouseDownAction=[!ToggleMeterGroup "Atomic"]
Any suggestions or recommendations are welcome.
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
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by eclectic-tech »

Start by correcting the measure issue balala pointed out...
[MeasureTop1] IfCondition should check the value of the current measure NOT the value of 'Lithium' (which doesn't exist in the code).

Code: Select all

...

[MeasureTop1]
Measure=Calc
Formula=([Lithium:W]+[Lithium:H])
DynamicVariables=1
IfCondition=(MeasureTop1=0)
IfTrueAction=[!ToggleGroup "Atomic"]

...
Now that measure value will toggle between 0 and 1. What you do with that info is up to you.

Can't really test because:
You didn't post the [MeasureLower6] measure.
I don't have the 120 images you reference.
The static positions place some items at the lower right corner because they are larger than my screen res. :welcome:
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by balala »

Mor3bane wrote:All it did was disable the Meter
A meter can't be disabled (or enabled), it can be hidden or shown. A measure can be disabled or enabled.
Mor3bane wrote:My wish is to make Top1 smart enough to know when the Atomic Group is on or off, and Toggle appropriately in tune with Group ExtHUD by understanding if Atomic is off it stays off, and if Atomic is on, it Toggles off as well - or back on - appropriately.
I'm sorry, but I think I didn't understand your wish. The Atomic and ExtHUD groups are practically the same, they both contain the [Lithium] and the [InfoPath] meters. So, if you toggle either Atomic, either ExtHUD group, the other group is also toggled. So, it's not clear at all what would you like.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by eclectic-tech »

If I understand your desired layout, you have a Top1 meter that toggles the ExtHUD group of meters, and an Atomic group that is toggle by a Lower6 meter, but is also controlled by Top1 (if Atomic is hidden, stays hidden, if showing toggles with ExtHUD group via Top1 action).

From this, you would need to have the HUD meters in the ExtHUD group, and the Lower6 meters in the Atomic group (don't have them in both groups).
HUD meters are only in the ExtHUD group.
Lower6 controlled meters are only in the Atomic group.

{Layout}
Top1
|
HUD (ExtHUD Group)
|
Lithium (Atomic Group)
InfoPath (Atomic Group)

Since all of the meters you posted are 40x40 pixels, you can use that to determine the current meter states (Hidden/Showing) to determine actions based on the sizes of a HUD meter and the Lithium meter.

Code: Select all

[MeasureTop1Action]
Measure=Calc
Formula=[HUD:W]+[HUD:H]+[Lithium:W]+[Lithium:H]

; Both hidden or only HUD showing, only toggle ExtHUD group
IfCondition=#CurrentSection#<=80
IfTrueAction=[!ToggleMeterGroup ExtHUD]

; Both showing, toggle both groups
IfCondition2=#CurrentSection#>80
IfTrueAction2=[!ToggleMeterGroup Atomic][!ToggleMeterGroup ExtHUD]

DynamicVariables=1
UpdateDivider=-1

[Top1]
Meter=Image
...
LeftMouseUpAction=[!UpdateMeasure MeasureTop1Action]
You may need to play with this since I do not have all of your code. But this should help get you closer...

EDIT: Expanded comment on first IfCondition test for clarity... :D
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Group1 | Group2 ToggleMeterGroup and on/off Status

Post by Mor3bane »

Thanks folks, for your time in helping me find a solution.

eclectic-tech

I remembered another bit of code you helped me with in 2015 - i know a while back.. I have a very good selective memory :D

It looked a bit like this, with the changes I made to get closer - most of the way anyways:

Code: Select all

[Variables]
@include=#@#RoundVariables.inc
FloaterHome=0
FloaterAtom=0

[mStatus]
Measure=Calc
Formula=#Floater#
IfCondition=#FloaterHome#=0
IfTrueAction=[!SetOptionGroup Home Hidden 1][!UpdateMeter *][!Redraw]
IfCondition2=#FloaterHome#=1
IfTrueAction2=[!SetOptionGroup Home Hidden 0][!UpdateMeter *][!Redraw]
IfCondition3=#FloaterAtom#=0
IfTrueAction3=[!SetOptionGroup Atomic Hidden 1][!UpdateMeter *][!Redraw]
IfCondition3=#FloaterAtoma#=1
IfTrueAction3=[!SetOptionGroup Atomic Hidden 0][!UpdateMeter *][!Redraaw]
DynamicVariables=1

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

[Lower6]
Meter=Image
SolidColor=0,0,0,1
X=880
Y=965
H=40
W=40
ToolTipText="Atomic Scan"
ToolTipType=1
LeftMouseDownAction=[!SetVariable FloaterAtom 1][mStatus][!ToggleMeterGroup "Atomic"]
DynamicVariables=1

[Lower8]
Meter=Image
SolidColor=0,0,0,1
X=995
Y=965
H=40
W=40
ToolTipText="World"
ToolTipType=1
LeftMouseUpAction=[!SetVariable FloaterHome 1][mStatus][!ToggleMeterGroup "Home"]
DynamicVariables=1
So this works nicely to keep the animated meters from persisting when Top1 is toggled off.
But when it toggles back on the little guys aren't being re-shown if they were on to start with.
What makes me want to try and go with the above is that I thunked up meself :bow:
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 »

Mor3bane wrote:Thanks folks, for your time in helping me find a solution.

eclectic-tech

I remembered another bit of code you helped me with in 2015 - i know a while back.. I have a very good selective memory :D

It looked a bit like this, with the changes I made to get closer - most of the way anyways:

Code: Select all

[Variables]
@include=#@#RoundVariables.inc
FloaterHome=0
FloaterAtom=0

[mStatus]
Measure=Calc
Formula=#Floater#
IfCondition=#FloaterHome#=0
IfTrueAction=[!SetOptionGroup Home Hidden 1][!UpdateMeter *][!Redraw]
IfCondition2=#FloaterHome#=1
IfTrueAction2=[!SetOptionGroup Home Hidden 0][!UpdateMeter *][!Redraw]
IfCondition3=#FloaterAtom#=0
IfTrueAction3=[!SetOptionGroup Atomic Hidden 1][!UpdateMeter *][!Redraw]
IfCondition3=#FloaterAtoma#=1
IfTrueAction3=[!SetOptionGroup Atomic Hidden 0][!UpdateMeter *][!Redraaw]
DynamicVariables=1

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

[Lower6]
Meter=Image
SolidColor=0,0,0,1
X=880
Y=965
H=40
W=40
ToolTipText="Atomic Scan"
ToolTipType=1
LeftMouseDownAction=[!SetVariable FloaterAtom 1][mStatus][!ToggleMeterGroup "Atomic"]
DynamicVariables=1

[Lower8]
Meter=Image
SolidColor=0,0,0,1
X=995
Y=965
H=40
W=40
ToolTipText="World"
ToolTipType=1
LeftMouseUpAction=[!SetVariable FloaterHome 1][mStatus][!ToggleMeterGroup "Home"]
DynamicVariables=1
So this works nicely to keep the animated meters from persisting when Top1 is toggled off.
But when it toggles back on the little guys aren't being re-shown if they were on to start with.
What makes me want to try and go with the above is that I thunked up meself :bow:
THIS is what it is all happening in.

Aaaand.. I quoted, not edited.

The actual skin is "Center Screen.ini"
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.