It is currently March 28th, 2024, 7:03 pm

!Fade Bang and !ShowMeter Bang

Get help with creating, editing & fixing problems with skins
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

!Fade Bang and !ShowMeter Bang

Post by JediWarrior »

Hi All,
Im sorry about all the questions over the skin Im trying to create. I want buttons to appear on a panel in a certain order and was hoping to do this with !ShowFade and !Delay Bangs. I wrote the line of code for the meters/buttons to !ShowFade with a click but the Rainmeter log kept telling me that the "Skin" could not be found. I think I've figured that it's got something to do with the skins not being active but thats as far as I can stretch my brain matter I'm afraid. Can someone please explain how a skin becomes active if its had to be started as Hidden so that I can show or hide it as required. Thankls in anticipation... :thumbup: :thumbup: :D :D
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: !Fade Bang and !ShowMeter Bang

Post by JediWarrior »

Sorry, I fogot to add. If I use the !showFade bang thats when I get the "Not Found" in the Log, but if I use !ShowMeter the meter shows fine but I dont seem to be able to use the Fade option with it, Thanks again. :thumbup: :thumbup: :great: :D :D
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !Fade Bang and !ShowMeter Bang

Post by balala »

It seems there is a misunderstanding. !ShowFade (and !HideFade and !Show and !Hide) can be used to show / hide a loaded skin, not meters of the skin. As you well observed, to show / hide the meters, you have to use the !ShowMeter / !HideMeter bangs, but these don't have a corresponding bang to show / hide the meters using a fade effect.
Newly for a such thing, the ActionTimer plugin should be used, but this isn't a very easy solution, the code can be complicated a lot. Usually doesn't worth.
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: !Fade Bang and !ShowMeter Bang

Post by JediWarrior »

Hi Balala,
I see now, sorry cuz it takes a while to sink in with me. Thank you Mate I understand Rainmeter that little bit better now... :thumbup: :thumbup: :thumbup: :D :D :D
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !Fade Bang and !ShowMeter Bang

Post by balala »

JediWarrior wrote:I see now, sorry cuz it takes a while to sink in with me. Thank you Mate I understand Rainmeter that little bit better now... :thumbup: :thumbup: :thumbup: :D :D :D
I'm glad.
If you're still interested in how the ActionTimer plugin can be used to show / hide a meter using the fade effect, let me know and tomorrow I'll post an example here. But from start I have to say that especially if you have more meters which should be shown / hidden with fade effect, the code will grow up too much.
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: !Fade Bang and !ShowMeter Bang

Post by JediWarrior »

Hi Balala,
Thaank you my friend. There are 8 meters to load 2 at a time .. If you could post the code and I give it a try and it gets too big then at least Ive learned something along the way
. Again THANK YOU... :D :D :thumbup: :thumbup:
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !Fade Bang and !ShowMeter Bang

Post by balala »

JediWarrior wrote:Hi Balala,
Thaank you my friend. There are 8 meters to load 2 at a time .. If you could post the code and I give it a try and it gets too big then at least Ive learned something along the way
. Again THANK YOU... :D :D :thumbup: :thumbup:
Ok, here is a short example. I used eight image meters, with eight different colors. Initially their transparency is set to 100. If you want to make them invisible, just modify the value of the Trans12, Trans34, ... variables, within the [Variables] section, to 1. Take care to not set them to 0, because in this case, they being transparent, wont react to mouse hovering.
There are four ActionTimer plugin measures ([MeasureFade12] - [MeasureFade78]). These measures will set continuously the value of the TransXX variables, accordingly. The U12, U34, ... variables are used to update the appropriate sections each.
The code:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[Variables]
Trans12=100
Trans34=100
Trans56=100
Trans78=100
U12=[!UpdateMeasure "MeasureFade12"][!UpdateMeter "Meter1"][!UpdateMeter "Meter2"][!Redraw]
U34=[!UpdateMeasure "MeasureFade34"][!UpdateMeter "Meter3"][!UpdateMeter "Meter4"][!Redraw]
U56=[!UpdateMeasure "MeasureFade56"][!UpdateMeter "Meter5"][!UpdateMeter "Meter6"][!Redraw]
U78=[!UpdateMeasure "MeasureFade78"][!UpdateMeter "Meter7"][!UpdateMeter "Meter8"][!Redraw]

[MeterStyle]
W=100
H=50
DynamicVariables=1

[MeasureFade12]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat FadeIn12,20,14
FadeIn12=[!SetVariable Trans12 "(Clamp((#Trans12#+20),1,255))"]#U12#
ActionList2=Repeat FadeOut12,20,14
FadeOut12=[!SetVariable Trans12 "(Clamp((#Trans12#-20),1,255))"]#U12#
DynamicVariables=1

[MeasureFade34]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat FadeIn34,20,14
FadeIn34=[!SetVariable Trans34 "(Clamp((#Trans34#+20),1,255))"]#U34#
ActionList2=Repeat FadeOut34,20,14
FadeOut34=[!SetVariable Trans34 "(Clamp((#Trans34#-20),1,255))"]#U34#
DynamicVariables=1

[MeasureFade56]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat FadeIn56,20,14
FadeIn56=[!SetVariable Trans56 "(Clamp((#Trans56#+20),1,255))"]#U56#
ActionList2=Repeat FadeOut56,20,14
FadeOut56=[!SetVariable Trans56 "(Clamp((#Trans56#-20),1,255))"]#U56#
DynamicVariables=1

[MeasureFade78]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat FadeIn78,20,14
FadeIn78=[!SetVariable Trans78 "(Clamp((#Trans78#+20),1,255))"]#U78#
ActionList2=Repeat FadeOut78,20,14
FadeOut78=[!SetVariable Trans78 "(Clamp((#Trans78#-20),1,255))"]#U78#
DynamicVariables=1

[Meter1]
Meter=Image
MeterStyle=MeterStyle
SolidColor=255,0,0,#Trans12#
X=0
Y=0
MouseOverAction=[!CommandMeasure "MeasureFade12" "Execute 1"][!CommandMeasure "MeasureFade12" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade12" "Stop 1"][!CommandMeasure "MeasureFade12" "Execute 2"]

[Meter2]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,255,0,#Trans12#
X=5R
Y=0r
MouseOverAction=[!CommandMeasure "MeasureFade12" "Execute 1"][!CommandMeasure "MeasureFade12" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade12" "Stop 1"][!CommandMeasure "MeasureFade12" "Execute 2"]

[Meter3]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,0,255,#Trans34#
X=5R
Y=0r
MouseOverAction=[!CommandMeasure "MeasureFade34" "Execute 1"][!CommandMeasure "MeasureFade34" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade34" "Stop 1"][!CommandMeasure "MeasureFade34" "Execute 2"]

[Meter4]
Meter=Image
MeterStyle=MeterStyle
SolidColor=255,240,0,#Trans34#
X=5R
Y=0r
MouseOverAction=[!CommandMeasure "MeasureFade34" "Execute 1"][!CommandMeasure "MeasureFade34" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade34" "Stop 1"][!CommandMeasure "MeasureFade34" "Execute 2"]

[Meter5]
Meter=Image
MeterStyle=MeterStyle
SolidColor=255,0,240,#Trans56#
X=0
Y=5R
MouseOverAction=[!CommandMeasure "MeasureFade56" "Execute 1"][!CommandMeasure "MeasureFade56" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade56" "Stop 1"][!CommandMeasure "MeasureFade56" "Execute 2"]

[Meter6]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,255,240,#Trans56#
X=5R
Y=0r
MouseOverAction=[!CommandMeasure "MeasureFade56" "Execute 1"][!CommandMeasure "MeasureFade56" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade56" "Stop 1"][!CommandMeasure "MeasureFade56" "Execute 2"]

[Meter7]
Meter=Image
MeterStyle=MeterStyle
SolidColor=128,75,0,#Trans78#
X=5R
Y=0r
MouseOverAction=[!CommandMeasure "MeasureFade78" "Execute 1"][!CommandMeasure "MeasureFade78" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade78" "Stop 1"][!CommandMeasure "MeasureFade78" "Execute 2"]

[Meter8]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,75,128,#Trans78#
X=5R
Y=0r
MouseOverAction=[!CommandMeasure "MeasureFade78" "Execute 1"][!CommandMeasure "MeasureFade78" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade78" "Stop 1"][!CommandMeasure "MeasureFade78" "Execute 2"]
Copy this code into a .ini file and load it. Initially you see eight, differently colored rectangles. When you're hovering the mouse over any of them, two will fade in and when you're leaving it, they same two will fade out. But this time they will fade out completely, becoming invisible (well, in fact not quite, but their transparency will be set to 1, from 255, which practically means transparency).
The ActionTimer plugin measures are executed by the !CommandMeasure bangs of the MouseOverAction and MouseLeaveAction options of the image meters.
The same things, without the fade effect, would be achieved with the following, much simpler code:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[Variables]
Trans12=100
Trans34=100
Trans56=100
Trans78=100

[MeterStyle]
W=100
H=50
DynamicVariables=1

[Meter1]
Meter=Image
MeterStyle=MeterStyle
SolidColor=255,0,0,#Trans12#
X=0
Y=0
MouseOverAction=[!SetVariable Trans12 "255"][!UpdateMeter "Meter1"][!UpdateMeter "Meter2"][!Redraw]
MouseLeaveAction=[!SetVariable Trans12 "1"][!UpdateMeter "Meter1"][!UpdateMeter "Meter2"][!Redraw]

[Meter2]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,255,0,#Trans12#
X=5R
Y=0r
MouseOverAction=[!SetVariable Trans12 "255"][!UpdateMeter "Meter1"][!UpdateMeter "Meter2"][!Redraw]
MouseLeaveAction=[!SetVariable Trans12 "1"][!UpdateMeter "Meter1"][!UpdateMeter "Meter2"][!Redraw]

[Meter3]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,0,255,#Trans34#
X=5R
Y=0r
MouseOverAction=[!SetVariable Trans34 "255"][!UpdateMeter "Meter3"][!UpdateMeter "Meter4"][!Redraw]
MouseLeaveAction=[!SetVariable Trans34 "1"][!UpdateMeter "Meter3"][!UpdateMeter "Meter4"][!Redraw]

[Meter4]
Meter=Image
MeterStyle=MeterStyle
SolidColor=255,240,0,#Trans34#
X=5R
Y=0r
MouseOverAction=[!SetVariable Trans34 "255"][!UpdateMeter "Meter3"][!UpdateMeter "Meter4"][!Redraw]
MouseLeaveAction=[!SetVariable Trans34 "1"][!UpdateMeter "Meter3"][!UpdateMeter "Meter4"][!Redraw]

[Meter5]
Meter=Image
MeterStyle=MeterStyle
SolidColor=255,0,240,#Trans56#
X=0
Y=5R
MouseOverAction=[!SetVariable Trans56 "255"][!UpdateMeter "Meter5"][!UpdateMeter "Meter6"][!Redraw]
MouseLeaveAction=[!SetVariable Trans56 "1"][!UpdateMeter "Meter5"][!UpdateMeter "Meter6"][!Redraw]

[Meter6]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,255,240,#Trans56#
X=5R
Y=0r
MouseOverAction=[!SetVariable Trans56 "255"][!UpdateMeter "Meter5"][!UpdateMeter "Meter6"][!Redraw]
MouseLeaveAction=[!SetVariable Trans56 "1"][!UpdateMeter "Meter5"][!UpdateMeter "Meter6"][!Redraw]

[Meter7]
Meter=Image
MeterStyle=MeterStyle
SolidColor=128,75,0,#Trans78#
X=5R
Y=0r
MouseOverAction=[!SetVariable Trans78 "255"][!UpdateMeter "Meter7"][!UpdateMeter "Meter8"][!Redraw]
MouseLeaveAction=[!SetVariable Trans78 "1"][!UpdateMeter "Meter7"][!UpdateMeter "Meter8"][!Redraw]

[Meter8]
Meter=Image
MeterStyle=MeterStyle
SolidColor=0,75,128,#Trans78#
X=5R
Y=0r
MouseOverAction=[!SetVariable Trans78 "255"][!UpdateMeter "Meter7"][!UpdateMeter "Meter8"][!Redraw]
MouseLeaveAction=[!SetVariable Trans78 "1"][!UpdateMeter "Meter7"][!UpdateMeter "Meter8"][!Redraw]
Compare the two codes, to decide if it worth to use the fade effect.
If the it seems to worth using them, you'll have to try to use them accordingly in your code. If you can't figure out something, please post the code you have so far and I (or someone here) will try to make the needed modifications to make it to work.
JediWarrior
Posts: 60
Joined: June 18th, 2017, 8:22 pm
Location: Liverpool UK

Re: !Fade Bang and !ShowMeter Bang

Post by JediWarrior »

If you can't figure out something, please post the code you have so far and I (or someone here) will try to make the needed modifications to make it to work.
Thank you for the code Balala I will let you know how it goes and I think you know I will probably take you up on the above offer of more help... :thumbup: :thumbup: :D :D ;-) ;-)
It has been scientifically proven that racists,homophobes and all bigots are considerably less intelligent than people who see difference as a positive thing. The report also states that this is especially true of people who wont accept this as a fact but still deny being a racist, homophobe or bigot. :p :p :p
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !Fade Bang and !ShowMeter Bang

Post by balala »

JediWarrior wrote:Thank you for the code Balala I will let you know how it goes and I think you know I will probably take you up on the above offer of more help... :thumbup: :thumbup: :D :D ;-) ;-)
Fell free to...