I'm glad if you find it useful.andersonventura wrote: ↑December 13th, 2018, 8:56 pm Is there any way to use this method working with shapes?
Post the code you have so far, please. It definitely is possible, just let's see your code.
I'm glad if you find it useful.andersonventura wrote: ↑December 13th, 2018, 8:56 pm Is there any way to use this method working with shapes?
Code: Select all
[Rainmeter]
Update=1
SkinWidth=1920
SkinHeight=1080
;======================================================================
[Variables]
;------------------------------------------
0001=Ellipse 15,15,14 | Fill Color 255,255,255,1 | StrokeWidth 0
0002=Ellipse 15,15,14 | Fill Color 255,255,0,255 | StrokeWidth 0
;------------------------------------------
0003=Ellipse 45,15,14 | Fill Color 255,255,255,1 | StrokeWidth 0
0004=Ellipse 45,15,14 | Fill Color 255,255,0,255 | StrokeWidth 0
;------------------------------------------
;======================================================================
[Slice0001]
Meter=Shape
Shape=#0001#
MouseOverAction=[!SetOption Slice0001 Shape "#0002#"][!UpdateMeter Slice0001][!Redraw]
MouseLeaveAction=[!SetOption Slice0001 Shape "#0001#"][!UpdateMeter Slice0001][!Redraw]
[Slice0002]
Meter=Shape
Shape=#0003#
MouseOverAction=[!SetOption Slice0002 Shape "#0004#"][!UpdateMeter Slice0002][!Redraw]
MouseLeaveAction=[!SetOption Slice0002 Shape "#0003#"][!UpdateMeter Slice0002][!Redraw]
Ok, I'll take a look tomorrow. Unfortunately for you, here is almost midnight, so I immediately will go to sleep, but tomorrow I'll try to find a solution (if no one will, in meantime).andersonventura wrote: ↑December 13th, 2018, 9:21 pm this code was as close as I could get to my goal!
Code: Select all
[Rainmeter]
Update=30
SkinWidth=1920
SkinHeight=1080
;======================================================================
[Variables]
;------------------------------------------
0001=Ellipse 15,15,14 | Fill Color 255,255,255,[MeasureAlpha1] | StrokeWidth 0
0002=Ellipse 15,15,14 | Fill Color 255,255,0,255 | StrokeWidth 0
;------------------------------------------
0003=Ellipse 45,15,14 | Fill Color 255,255,255,[MeasureAlpha2] | StrokeWidth 0
0004=Ellipse 45,15,14 | Fill Color 255,255,0,255 | StrokeWidth 0
;------------------------------------------
Sgn1=1
Sgn2=1
;======================================================================
[MeasureAlpha1]
Measure=Calc
Formula=( Clamp (( MeasureAlpha1 + #Sgn1# * 10 ), 1, 255 ))
IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=255))
IfTrueAction=[!PauseMeasure "#CURRENTSECTION#"]
DynamicVariables=1
Paused=1
[MeasureAlpha2]
Measure=Calc
Formula=( Clamp (( MeasureAlpha2 + #Sgn2# * 10 ), 1, 255 ))
IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=255))
IfTrueAction=[!PauseMeasure "#CURRENTSECTION#"]
DynamicVariables=1
Paused=1
[Slice0001]
Meter=Shape
Shape=#0001#
MouseOverAction=[!SetVariable Sgn1 "1"][!UnpauseMeasure "MeasureAlpha1"]
MouseLeaveAction=[!SetVariable Sgn1 "-1"][!UnpauseMeasure "MeasureAlpha1"]
DynamicVariables=1
[Slice0002]
Meter=Shape
Shape=#0003#
MouseOverAction=[!SetVariable Sgn2 "1"][!UnpauseMeasure "MeasureAlpha2"]
MouseLeaveAction=[!SetVariable Sgn2 "-1"][!UnpauseMeasure "MeasureAlpha2"]
DynamicVariables=1
Hello!balala wrote: ↑December 15th, 2018, 5:47 pm Apologies for the very late reply.
Practically you don't need to change the Shape options of those Shape meters. One shape per meter is enough. You have to change the transparency of the existing shape. For this you have to modify the 0001 and 0003 variables and can remove 0002 and 0004.
Note that the lowest possible value of Update is 16 (second paragraph here). Update=1 can't be used, or in fact Rainmeter will use the lowest Update=16 possible. I put Update=30, but you can experiment to find a better value if needed (without going below 16).
The rewritten code:Code: Select all
[Rainmeter] Update=30 SkinWidth=1920 SkinHeight=1080 ;====================================================================== [Variables] ;------------------------------------------ 0001=Ellipse 15,15,14 | Fill Color 255,255,255,[MeasureAlpha1] | StrokeWidth 0 0002=Ellipse 15,15,14 | Fill Color 255,255,0,255 | StrokeWidth 0 ;------------------------------------------ 0003=Ellipse 45,15,14 | Fill Color 255,255,255,[MeasureAlpha2] | StrokeWidth 0 0004=Ellipse 45,15,14 | Fill Color 255,255,0,255 | StrokeWidth 0 ;------------------------------------------ Sgn1=1 Sgn2=1 ;====================================================================== [MeasureAlpha1] Measure=Calc Formula=( Clamp (( MeasureAlpha1 + #Sgn1# * 10 ), 1, 255 )) IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=255)) IfTrueAction=[!PauseMeasure "#CURRENTSECTION#"] DynamicVariables=1 Paused=1 [MeasureAlpha2] Measure=Calc Formula=( Clamp (( MeasureAlpha2 + #Sgn2# * 10 ), 1, 255 )) IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=255)) IfTrueAction=[!PauseMeasure "#CURRENTSECTION#"] DynamicVariables=1 Paused=1 [Slice0001] Meter=Shape Shape=#0001# MouseOverAction=[!SetVariable Sgn1 "1"][!UnpauseMeasure "MeasureAlpha1"] MouseLeaveAction=[!SetVariable Sgn1 "-1"][!UnpauseMeasure "MeasureAlpha1"] DynamicVariables=1 [Slice0002] Meter=Shape Shape=#0003# MouseOverAction=[!SetVariable Sgn2 "1"][!UnpauseMeasure "MeasureAlpha2"] MouseLeaveAction=[!SetVariable Sgn2 "-1"][!UnpauseMeasure "MeasureAlpha2"] DynamicVariables=1
To be honest I have no idea where have you get the above ImageAlpha option, in my code nowhere a [Measure0001] measure doesn't exist and due to this, you can't use it. In fact a Shape meter doesn't even has an ImageAlpha option, this option can be used only on Image meter. A such option was used in the previous code, but because the last one works with Shape meters instead of Image, it is not used any more. Are you sure you didn't mix something?andersonventura wrote: ↑December 16th, 2018, 1:27 am Analyzing again, I realized that just ImageAlpha = (Clamp ([Measure0001], 1,255)) contained in measure, is not inserted! Would not that be the problem?
Code: Select all
[Rainmeter]
Update=16
SkinWidth=1920
SkinHeight=1080
[Variables]
MaxAlpha=150
Velocity0001=12
Velocity0002=12
Variable0001=1
Variable0002=1
Shape0001=Ellipse 15,15,14 | Fill Color 255,255,250,[Measure0001] | StrokeWidth 0
Shape0002=Ellipse 45,15,14 | Fill Color 255,255,250,[Measure0002] | StrokeWidth 0
;-------------------------------------------
[Measure0001]
Measure=Calc
Formula=(Clamp((#CURRENTSECTION# + #Variable0001# * #Velocity0001#), 1, #MaxAlpha#))
IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=#MaxAlpha#))
IfTrueAction=[!PauseMeasure "#CURRENTSECTION#"]
DynamicVariables=1
Paused=1
[Measure0002]
Measure=Calc
Formula=(Clamp((#CURRENTSECTION# + #Variable0002# * #Velocity0002#), 1, #MaxAlpha#))
IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=#MaxAlpha#))
IfTrueAction=[!PauseMeasure "#CURRENTSECTION#"]
DynamicVariables=1
Paused=1
;-------------------------------------------
[Slice0001]
Meter=Shape
Shape=#Shape0001#
SolidColor=0,0,0,1
MouseOverAction=[!SetVariable Velocity0001 "12"][!SetVariable Variable0001 "1"][!UnpauseMeasure "Measure0001"]
MouseLeaveAction=[!SetVariable Velocity0001 "2"][!SetVariable Variable0001 "-1"][!UnpauseMeasure "Measure0001"]
DynamicVariables=1
[Slice0002]
Meter=Shape
Shape=#Shape0002#
SolidColor=0,0,0,1
MouseOverAction=[!SetVariable Velocity0002 "12"][!SetVariable Variable0002 "1"][!UnpauseMeasure "Measure0002"]
MouseLeaveAction=[!SetVariable Velocity0002 "2"][!SetVariable Variable0002 "-1"][!UnpauseMeasure "Measure0002"]
DynamicVariables=1