Hi,
I playing around with the WebParser Plugin right now. Is it possible to show the skin when a value has changed and hide it after 3 seconds?
It is currently March 29th, 2024, 10:50 am
Skin hide and show after value change
-
- Posts: 25
- Joined: October 7th, 2016, 9:38 am
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Skin hide and show after value change
Certainly it is. It's a bit harder not knowing your code, but let's try.
First add to the measure which returns the value which must be followed, the following option: OnChangeAction=[!ShowFade "#CURRENTCONFIG#"][!EnableMeasure "MeasureTimer"]. This option will show the skin when the value of the measure changes and will enable the [MeasureTimer] measure. This last one will be used to hide again the skin, after 3 seconds.
And finally, add the following measure to your code:
This measure, when enabled will start to count and when it reaches 3 (the value set into the IfCondition option), according to the IfTrueAction option, will hide the skin and will disable itself. When the measure again changes, its OnChangeAction option will show again the skin and the [MeasureTimer] measure again will start counting.
If you can't implement what I wrote, please post the code you have so far and let us know the changes of which measure should be followed.
First add to the measure which returns the value which must be followed, the following option: OnChangeAction=[!ShowFade "#CURRENTCONFIG#"][!EnableMeasure "MeasureTimer"]. This option will show the skin when the value of the measure changes and will enable the [MeasureTimer] measure. This last one will be used to hide again the skin, after 3 seconds.
And finally, add the following measure to your code:
Code: Select all
[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 1 )
IfCondition=(MeasureTimer=3)
IfTrueAction=[!HideFade "#CURRENTCONFIG#"]
If you can't implement what I wrote, please post the code you have so far and let us know the changes of which measure should be followed.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Skin hide and show after value change
I think you missed a [!DisableMeasure "MeasureTimer"] on the IfTrueAction.balala wrote:Certainly it is. It's a bit harder not knowing your code, but let's try.
First add to the measure which returns the value which must be followed, the following option: OnChangeAction=[!ShowFade "#CURRENTCONFIG#"][!EnableMeasure "MeasureTimer"]. This option will show the skin when the value of the measure changes and will enable the [MeasureTimer] measure. This last one will be used to hide again the skin, after 3 seconds.
And finally, add the following measure to your code:This measure, when enabled will start to count and when it reaches 3 (the value set into the IfCondition option), according to the IfTrueAction option, will hide the skin and will disable itself. When the measure again changes, its OnChangeAction option will show again the skin and the [MeasureTimer] measure again will start counting.Code: Select all
[MeasureTimer] Measure=Calc Formula=( MeasureTimer + 1 ) IfCondition=(MeasureTimer=3) IfTrueAction=[!HideFade "#CURRENTCONFIG#"]
If you can't implement what I wrote, please post the code you have so far and let us know the changes of which measure should be followed.
-
- Posts: 25
- Joined: October 7th, 2016, 9:38 am
Re: Skin hide and show after value change
I was just about to klick submit because of this, because it was not hiding
Thanks alot to both of you, it is working now
I got another problem, maybe you have an Idea on that too.
The Value i got from the Webparser it not exactly correct because the calculation is different.
When i got -50 from the Plugin the actual value is 30. I already erased the - with the Webparser.
The scheme is like this:
And so on till 0 = 80. Is there a good way to achieve that except Using for every single value?
Thanks alot to both of you, it is working now
I got another problem, maybe you have an Idea on that too.
The Value i got from the Webparser it not exactly correct because the calculation is different.
When i got -50 from the Plugin the actual value is 30. I already erased the - with the Webparser.
The scheme is like this:
Code: Select all
-79,5
0,5
-79
1
-78,5
1,5
-78
2
-77,5
2,5
-77
3
-76,5
3,5
-76
4
-75,5
4,5
-75
5
-74,5
5,5
-74
6
-73,5
6,5
-73
7
-72,5
7,5
-72
8
-71,5
8,5
-71
9
-70,5
9,5
-70
10
Code: Select all
; RegExpSubstitute=1
; Substitute="45":"35"
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Skin hide and show after value change
You're right again, I'm sorry, I indeed forgot that bang.jsmorley wrote:I think you missed a [!DisableMeasure "MeasureTimer"] on the IfTrueAction.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Skin hide and show after value change
I'm not sure I completely understood, but if I'm not wrong you would like to get 30, when the WebParser measure returns -50? If that's right, you just have to create a Calc measure, something like this one:Bugmenot wrote:I got another problem, maybe you have an Idea on that too.
The Value i got from the Webparser it not exactly correct because the calculation is different.
When i got -50 from the Plugin the actual value is 30. I already erased the - with the Webparser.
Code: Select all
[MeasureNewVal]
Measure=Calc
Formula=( [TheWebParserMeasure] + 80 )
DynamicVariable=1
Anyway, the RegExpSubstitute=1 option is not needed along with Substitute="45":"35", because in this last substitution, regular expressions aren't used
-
- Posts: 25
- Joined: October 7th, 2016, 9:38 am
Re: Skin hide and show after value change
Thats not working because the values are negative. 40 is 40 but 41 will be 39 with this method.
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Skin hide and show after value change
Probably I misunderstood something. But you said:
Not sure what you would like...
then:Bugmenot wrote:When i got -50 from the Plugin the actual value is 30.
and finally in the posted list, the difference between each two consecutive numbers is 80, that's why I thought the posted solution.Bugmenot wrote:And so on till 0 = 80.
Not sure what you would like...
-
- Posts: 25
- Joined: October 7th, 2016, 9:38 am
Re: Skin hide and show after value change
Yes, you are right, iam stupid
But the +80 does not seem to work, can you see why:
The New Measure is always 80.
But the +80 does not seem to work, can you see why:
Code: Select all
[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
AccurateText=1
[MeasureSite]
Measure=Plugin
Plugin=WebParser
URL=http://192.168.100.55/goform/formMainZone_MainZoneXmlStatusLite.xml
RegExp=(?siU)<MasterVolume><value>(.*)</value>
UpdateRate=1
OnChangeAction=[!ShowFade "#CURRENTCONFIG#"][!EnableMeasure "MeasureTimer"]
[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 1 )
IfCondition=(MeasureTimer=5)
IfTrueAction=[!HideFade "#CURRENTCONFIG#"][!DisableMeasure "MeasureTimer"]
[MeasureVolume]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=1
[MeasureNewVol]
Measure=Calc
Formula=( [MeasureVolume] + 80 )
DynamicVariable=1
[MeterVolumeLabel]
Meter=String
X=65
Y=12
W=5
H=18
FontSize=12
FontColor=255,225,181,255
AntiAlias=1
Text=Volume
[MeterVolume]
Meter=String
MeasureName=MeasureNewVol
X=90
Y=7R
W=5
H=18
FontSize=12
FontColor=255,225,181,255
AntiAlias=1
-
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Skin hide and show after value change
Yeah, that's my fault, I apologize. I miswrote an option, in one of my previous posts, where I used a DynamicVariable=1 option, instead of the correct DynamicVariable[color=#FF0000]s[/color]=1. You copied the code and the typo remaind, so please fix that issue and try it again ([MeasureNewVol] measure).Bugmenot wrote:But the +80 does not seem to work, can you see why:
The New Measure is always 80.
I can't reach the needed URL. I assume that's a local one, so no way for me to check, but for sure this will fix the issue. Does it?
Sorry again for my mistake.