It is currently December 9th, 2023, 3:30 pm
Get help with creating, editing & fixing problems with skins
- Posts: 5
- Joined: November 5th, 2023, 4:25 pm
Hello, I need help with the widget again. I created such a widget and I don't know why the red square disappears.
Here is the script:
Code: Select all
U=[!UpdateMeasure MeasureSlider][!UpdateMeter *][!Redraw]
; Slider Measure
ActionList1=Repeat SlideLeft, 3, 110
SlideLeft=[!SetVariable State "2"][!SetVariable OffSet "(Clamp(#OffSet#-4.5,-20,400))"]#U#
ActionList2=Repeat SlideRight, 3, 110
SlideRight=[!SetVariable State "1"][!SetVariable OffSet "(Clamp(#OffSet#+4.5,-20,400))"]#U#
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Execute #State#"]
X=(#OffSet# - 50)
You do not have the required permissions to view the files attached to this post.
- Rainmeter Sage
- Posts: 15840
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Moved the whole topic
from the Other Software & Customization
section to Help: Rainmeter Skins
Oziv44 wrote: ↑November 11th, 2023, 6:33 pm
I don't know why the red square disappears.
Because when the ActionList1 of the [MeasureSlider] measure is executed, the value of the Offset variable decreases to -20. The X option of the [MeterRedSquare] meter is set to X=(#OffSet# - 50)
, which means at the end, the meter is positioned to X=-70
. Its width being set to W=50
, when it gets its leftmost position, it goes outside of the skin to left. No meters this way positioned can be seen.
A solution is to limit the value of the X option of the meter, to not let it to decrease too much, until the meter is not seeable anymore. For instance you can add a Clamp function to the X option of the [MeterRedSquare] meter, like the following one: X=(Clamp((#OffSet#-50),0,400))
. See that if you add this function, the meter will be kept always on the visible surface of the skin. But obviously what the proper solution is, depends on where would you like to get the meter when the ActionTimer plugin measure decreases the Offset variable.