Um, ok.
MeterText shows some info. It shows in mouse CLICK.
A button in and of itself, hides MeterText on mouseover. This works fine.
A new button needs to know if #aState#=1. If it equal to 1, then the mouseover will show metertext. If it is equal to 0 then essentially nothing happens.
The text and buttons are separate entities in and of themselves. The mouseover is NOT on the text, it is on a button.
So the logic is really simple. Just how to I trigger the MeasureTri to determine if #aState#=1 to show the text. Nothing else matters really.
Just the button in visual space >x< and waaaay over here is the text >text<.
It is currently April 25th, 2024, 5:42 pm
Using Measure Bangs [solution found]
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Using Measure Bangs
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Using Measure Bangs
Well, I suspect I'm not getting this at all, but if I go with the assumption that you are setting the variable #aState# somewhere else, and you just want the MouseOverAction to check the value of #aState# and take some action based on it, it's like this:CodeCode wrote: ↑July 25th, 2021, 12:58 pm Um, ok.
MeterText shows some info. It shows in mouse CLICK.
A button in and of itself, hides MeterText on mouseover. This works fine.
A new button needs to know if #aState#=1. If it equal to 1, then the mouseover will show metertext. If it is equal to 0 then essentially nothing happens.
The text and buttons are separate entities in and of themselves. The mouseover is NOT on the text, it is on a button.
So the logic is really simple. Just how to I trigger the MeasureTri to determine if #aState#=1 to show the text. Nothing else matters really.
Just the button in visual space >x< and waaaay over here is the text >text<.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
aState=1
[MeasureTri]
Measure=Calc
IfCondition=(#aState# = 0)
IfTrueAction=[!HideMeter MeterText]
IfCondition2=(#aState# = 1)
IfTrueAction2=[!ShowMeter MeterText]
DynamicVariables=1
UpdateDivider=-1
[MeterText]
Meter=String
FontSize=15
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
MouseOverAction=[!UpdateMeasure MeasureTri]
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Using Measure Bangs
Note the change to [MeasureTri].jsmorley wrote: ↑July 25th, 2021, 1:03 pm Well, I suspect I'm not getting this at all, but if I go with the assumption that you are setting the variable #aState# somewhere else, and you just want the MouseOverAction to check the value of #aState# and take some action based on it, it's like this:
Code: Select all
[Rainmeter] Update=1000 DynamicWindowSize=1 AccurateText=1 [Variables] aState=1 [MeasureTri] Measure=Calc IfCondition=(#aState# = 1) IfTrueAction=[!ShowMeter MeterText] DynamicVariables=1 UpdateDivider=-1 [MeterText] Meter=String FontSize=15 FontWeight=400 FontColor=255,255,255,255 SolidColor=47,47,47,255 Padding=5,5,5,5 AntiAlias=1 Text=Hello World MouseOverAction=[!UpdateMeasure MeasureTri]
But, yes. That is what I am trying to accomplish.
Note, the code above - is changed from Jsmorley's post to only test IfCondition=(#aState# = 1) .
Then in the separate button image, MouseOverAction=[!UpdateMeasure MeasureTri]
However, it isnt working like that.
The MeasureTri 'looks' correct from my view. But the mouse over isnt working.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Using Measure Bangs
But nothing in your example is ever changing the value of #aState#...
Try this:
Try this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
aState=1
[MeasureTri]
Measure=Calc
IfCondition=(#aState# = 0)
IfTrueAction=[!HideMeter MeterText][!UpdateMeter *][!Redraw]
IfCondition2=(#aState# = 1)
IfTrueAction2=[!ShowMeter MeterText][!UpdateMeter *][!Redraw]
DynamicVariables=1
UpdateDivider=-1
[MeterText]
Meter=String
FontSize=15
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
[MeterHideShow]
Meter=Image
Y=40
W=50
H=50
SolidColor=255,255,255,255
DynamicVariables=1
MouseOverAction=[!SetVariable aState (1-#aState#)][!UpdateMeasure MeasureTri]
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Using Measure Bangs
Ok, we do not need to worry about how a$tate is set. Only that is will either be '1' or '0'. So I cannot 'need' to set aState at all.
If it is '1', then the [MeasureTri] needs to be triggered to show [MeterText]. If aState=0 nothing happens, as in no need to rehide the MeterText.
Still [!UpdateMeasure MeasureTri] does not work.
If it is '1', then the [MeasureTri] needs to be triggered to show [MeterText]. If aState=0 nothing happens, as in no need to rehide the MeterText.
Still [!UpdateMeasure MeasureTri] does not work.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Using Measure Bangs
I'm not sure I see the need for the MeasureTri at all to be honest...
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
aState=0
[MeterText]
Meter=String
FontSize=15
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Hidden=#aState#
DynamicVariables=1
Text=Hello World
[MeterHideShow]
Meter=Image
Y=40
W=50
H=50
SolidColor=255,255,255,255
DynamicVariables=1
MouseOverAction=[!SetVariable aState (1-#aState#)][!UpdateMeter *][!Redraw]
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Using Measure Bangs
Well, I'll explain the links and set up this way.
the variable aState will be either '1' or '0'. It hides or shows two groups of Meters. It is set my mouseclick in a separate line of logic, and there is no need to "handle" aState. it just is the value that it is - either '1' or '0'.
There are two separate image meters - 'buttons' essentially. They always show in this case.
The text meter is in another location and has no need to be managed with any kind of mouse actions.
Button1 hides metertext on mouse over - this is already working and there is no need to go further on Button1.
Button2 shows meter text on mouse over only if aState=1.
Since the aState handles other visuals - two groups of meters showing different graphical information.
If one visual is showing and aState=1 then metertext will show on mouse over.
If the other visual is showing and aState=0 then metertext will NOT show.
MeasureTri is how i imagined this third trigger state would need to work. But I am frequently wrong. There may be a much simpler way. I just cannot see it without the IfCondition testing the value of aState=1 or not.
the variable aState will be either '1' or '0'. It hides or shows two groups of Meters. It is set my mouseclick in a separate line of logic, and there is no need to "handle" aState. it just is the value that it is - either '1' or '0'.
There are two separate image meters - 'buttons' essentially. They always show in this case.
The text meter is in another location and has no need to be managed with any kind of mouse actions.
Button1 hides metertext on mouse over - this is already working and there is no need to go further on Button1.
Button2 shows meter text on mouse over only if aState=1.
Since the aState handles other visuals - two groups of meters showing different graphical information.
If one visual is showing and aState=1 then metertext will show on mouse over.
If the other visual is showing and aState=0 then metertext will NOT show.
MeasureTri is how i imagined this third trigger state would need to work. But I am frequently wrong. There may be a much simpler way. I just cannot see it without the IfCondition testing the value of aState=1 or not.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Using Measure Bangs
Well, I guess I don't understand why this doesn't work for you...
This code makes no assumptions about "how" the value of #aState# is changed. On MouseOverAction it will just fire the MeasureTri measure, which will evaluate the current value of #aState#, and take the appropriate action. Obviously, this little example does exactly NOTHING.
I'm sorry, but I just can't keep up with the ever changing requirements for this. Now it feels like we have two tests we need to do, to see if some "other visual" is "showing" and then check the state of #aState#". I'm just lost, and not sure I can really help.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
aState=1
[MeasureTri]
Measure=Calc
IfCondition=(#aState# = 0)
IfTrueAction=[!HideMeter MeterText][!UpdateMeter *][!Redraw]
IfCondition2=(#aState# = 1)
IfTrueAction2=[!ShowMeter MeterText][!UpdateMeter *][!Redraw]
DynamicVariables=1
UpdateDivider=-1
[MeterText]
Meter=String
FontSize=15
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Hello World
[MeterCheckState]
Meter=Image
Y=40
W=50
H=50
SolidColor=255,255,255,255
DynamicVariables=1
MouseOverAction=[!UpdateMeasure MeasureTri]
I'm sorry, but I just can't keep up with the ever changing requirements for this. Now it feels like we have two tests we need to do, to see if some "other visual" is "showing" and then check the state of #aState#". I'm just lost, and not sure I can really help.
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Using Measure Bangs
I don't know why... but this is what seems to work:
Sorry to be any cause of frustration. This certainly was not futile since I got a working version going, after the whole thread so far...
Code: Select all
[MeasureTri]
Measure=Calc
IfCondition=(#aState# = 0)
IfTrueAction=[!SetOption MeterText Text ""][!UpdateMeter *][!Redraw]
DynamicVariables=1
UpdateDivider=-1
Code: Select all
[MeterText]
...
MouseOverAction=[!ShowMeter "MeterText"][!Update]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Posts: 1366
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Using Measure Bangs
So, yes. Solution found.
There actually is a real hecking lot of things going on. But now, with the logic spelled out as "this way should work", I was able to get my mouse overs etc all working to my intent.
Thank you so much Jsmorley, for putting up with this in trying to get a solution. My visualisation is realised, and I think it is pretty flash, really, now that it is working correctly (or at least to my intentional appearance).
EDIT: Closing Note.
MouseOverAction=[!UpdateMeasure MeasureTri]
This is what I needed to know, to "Fire" the #aState#='1' or '0' test.
There actually is a real hecking lot of things going on. But now, with the logic spelled out as "this way should work", I was able to get my mouse overs etc all working to my intent.
Thank you so much Jsmorley, for putting up with this in trying to get a solution. My visualisation is realised, and I think it is pretty flash, really, now that it is working correctly (or at least to my intentional appearance).
EDIT: Closing Note.
MouseOverAction=[!UpdateMeasure MeasureTri]
This is what I needed to know, to "Fire" the #aState#='1' or '0' test.
Last edited by CodeCode on July 25th, 2021, 2:32 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.