The script does look complicated enough, but my question would be why do you need a lua script for fading in/out a meter/group? A such task can be definitely simpler managed by the ActionTimer plugin. And in plus, it wouldn't require a such small update value, as your code does. This would be a big advantage, in my opinion.
So, are you absolutely positively you need that lua script?
It is currently March 28th, 2024, 3:12 pm
group fade don't know how ..
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: group fade don't know how ..
Even with the ActionTimer plugin, if you're knowing it personally, you have a lot of settings possibilities.dvo wrote:this lua fade i can set manual other one is a auto fade set on one fade setting
i'm playing with some scripts altering but trying out lua have to learn it some how ...
and the lua has more things in it like move x and move y but for now i only need to know how to adress the group function
alone i can adress it already but combined is better for a mouse over with text
Anyway for my part, as I said, the lua script does look complicated enough to doesn't worth to alter it. Sorry.
If you're interested into the ActionTimer plugin approach, let me (us) know.
I don't contest this, but if is possible a greater Update is better, even on powerful machines (my opinion). Especially if you have a lot of skins loaded (as I have).dvo wrote:b.t.w. my pc has enough power to use update=16
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: group fade don't know how ..
Using ActionTimer to do a fade is not terribly hard, and far, far easier and more efficient than a Lua script and Update=16.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,1
MouseOverAction=[!CommandMeasure MeasureFadeOut "Stop 1"][!CommandMeasure MeasureFadeIn "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureFadeIn "Stop 1"][!CommandMeasure MeasureFadeOut "Execute 1"]
[Variables]
W=2
U=[!UpdateMeasureGroup Faders][!UpdateMeterGroup Faders][!Redraw]
CurrentAlpha=160
[MeasureFadeOut]
Measure=Plugin
Plugin=ActionTimer
Group=Faders
ActionList1=Repeat FadeCalc,#W#,20
FadeCalc=[!SetVariable CurrentAlpha "(Clamp(#CurrentAlpha#-5,160,255))"]#U#
DynamicVariables=1
[MeasureFadeIn]
Measure=Plugin
Plugin=ActionTimer
Group=Faders
ActionList1=Repeat FadeCalc,#W#,20
FadeCalc=[!SetVariable CurrentAlpha "(Clamp(#CurrentAlpha#+5,160,255))"]#U#
DynamicVariables=1
[MeterImage]
Meter=Image
Group=Faders
W=150
H=100
SolidColor=65,163,209,#CurrentAlpha#
DynamicVariables=1
[MeterText]
Meter=String
Group=Faders
Y=15R
X=75
StringAlign=Center
FontSize=20
FontColor=255,255,255,#CurrentAlpha#
Padding=5,5,5,5
SolidColor=0,0,0,#CurrentAlpha#
AntiAlias=1
Text=Hello World
DynamicVariables=1
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: group fade don't know how ..
A bit of code yes, but mostly just a bunch of variables and one pretty hefty ActionTimer measure...
One note: I noticed that with this skin, if I set the value of the "wait", the variable #W#, much less than "5", it ran the risk of overwhelming the Rainmeter message queue and sometimes even hanging Rainmeter if I ran the cursor over all all those meters really quickly up and down. Leave enough time between each individual action, so things don't get too stacked up. I found that 5 milliseconds worked pretty well for this skin.
Code: Select all
[Rainmeter]
Update=-1
DynamicWindowSize=1
AccurateText=1
[Variables]
W=5
U=[!UpdateMeasure MeasureFader][!UpdateMeterGroup Faders][!Redraw]
CurrentAlphaOne=160
CurrentAlphaTwo=160
CurrentAlphaThree=160
CurrentAlphaFour=160
CurrentAlphaFive=160
[MeasureFader]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Fade1,#W#,20
Fade1=[!SetVariable CurrentAlphaOne "(Clamp(#CurrentAlphaOne#-5,160,255))"]#U#
ActionList2=Repeat Fade2,#W#,20
Fade2=[!SetVariable CurrentAlphaOne "(Clamp(#CurrentAlphaOne#+5,160,255))"]#U#
ActionList3=Repeat Fade3,#W#,20
Fade3=[!SetVariable CurrentAlphaTwo "(Clamp(#CurrentAlphaTwo#-5,160,255))"]#U#
ActionList4=Repeat Fade4,#W#,20
Fade4=[!SetVariable CurrentAlphaTwo "(Clamp(#CurrentAlphaTWo#+5,160,255))"]#U#
ActionList5=Repeat Fade5,#W#,20
Fade5=[!SetVariable CurrentAlphaThree "(Clamp(#CurrentAlphaThree#-5,160,255))"]#U#
ActionList6=Repeat Fade6,#W#,20
Fade6=[!SetVariable CurrentAlphaThree "(Clamp(#CurrentAlphaThree#+5,160,255))"]#U#
ActionList7=Repeat Fade7,#W#,20
Fade7=[!SetVariable CurrentAlphaFour "(Clamp(#CurrentAlphaFour#-5,160,255))"]#U#
ActionList8=Repeat Fade8,#W#,20
Fade8=[!SetVariable CurrentAlphaFour "(Clamp(#CurrentAlphaFour#+5,160,255))"]#U#
ActionList9=Repeat Fade9,#W#,20
Fade9=[!SetVariable CurrentAlphaFive "(Clamp(#CurrentAlphaFive#-5,160,255))"]#U#
ActionList10=Repeat Fade10,#W#,20
Fade10=[!SetVariable CurrentAlphaFive "(Clamp(#CurrentAlphaFive#+5,160,255))"]#U#
DynamicVariables=1
[TextStyle]
Group=Faders
Y=5R
W=120
FontSize=13
FontWeight=700
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
[MeterOne]
Meter=String
MeterStyle=TextStyle
Y=0
FontColor=255,255,255,#CurrentAlphaOne#
Text=Meter One
MouseOverAction=[!CommandMeasure MeasureFader "Stop 1"][!CommandMeasure MeasureFader "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureFader "Stop 2"][!CommandMeasure MeasureFader "Execute 1"]
[MeterTwo]
Meter=String
MeterStyle=TextStyle
FontColor=255,255,255,#CurrentAlphaTwo#
Text=Meter Two
MouseOverAction=[!CommandMeasure MeasureFader "Stop 3"][!CommandMeasure MeasureFader "Execute 4"]
MouseLeaveAction=[!CommandMeasure MeasureFader "Stop 4"][!CommandMeasure MeasureFader "Execute 3"]
[MeterThree]
Meter=String
MeterStyle=TextStyle
FontColor=255,255,255,#CurrentAlphaThree#
Text=Meter Three
MouseOverAction=[!CommandMeasure MeasureFader "Stop 5"][!CommandMeasure MeasureFader "Execute 6"]
MouseLeaveAction=[!CommandMeasure MeasureFader "Stop 6"][!CommandMeasure MeasureFader "Execute 5"]
[MeterFour]
Meter=String
MeterStyle=TextStyle
FontColor=255,255,255,#CurrentAlphaFour#
Text=Meter Four
MouseOverAction=[!CommandMeasure MeasureFader "Stop 7"][!CommandMeasure MeasureFader "Execute 8"]
MouseLeaveAction=[!CommandMeasure MeasureFader "Stop 8"][!CommandMeasure MeasureFader "Execute 7"]
[MeterFive]
Meter=String
MeterStyle=TextStyle
FontColor=255,255,255,#CurrentAlphaFive#
Text=Meter Five
MouseOverAction=[!CommandMeasure MeasureFader "Stop 9"][!CommandMeasure MeasureFader "Execute 10"]
MouseLeaveAction=[!CommandMeasure MeasureFader "Stop 10"][!CommandMeasure MeasureFader "Execute 9"]
- jsmorley
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: group fade don't know how ..
Fair enough, there is seldom any one "right" way to do things in Rainmeter.dvo wrote:this one i did with the lua ... incl. image works well to. less code
i prefer the lua it's a better way handy less code instead of action timer couse you have to
set every action timer again and again .. the lua just does this with less code ... makes your code better readable