First approach: I've rewritten a few things into the code of the skin, getting it to work as intended, AS LONG as the height is kept enough high to get the [mKnobheight] measure positive.
If this measure goes negative, the code doesn't work well. Check it please.
As the next step, this is what has to be resolved. Let's see if I or anyone else will succeed.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[Metadata]
Name=Scrollr
Author=StArL0rd84
Information=Example skin to figure out the scrolling mechanics.
Version=1
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
[Variables]
@include=#@#Include\Variables.inc
@include2=#@#Include\Measures.inc
;@include3=#@#Include\Styles.inc
[ItemBackground]
Meter=Shape
Shape=Rectangle 0,0,220,#WindowHeight# | StrokeWidth 0 | Fill Color 255,0,0,255
Shape2=Rectangle 1,1,218,(#WindowHeight#-2) | StrokeWidth 0 | Fill Color 0,0,0,255
DynamicVariables=1
Group=BG
;MouseScrollUpAction=[!UpdateMeasureGroup Max][!SetVariable Scroll "(((#Scroll#-#ScrollInc#)<#ScrollMin#)?#ScrollMin#:(#Scroll#-#ScrollInc#))"][!WriteKeyValue Variables Scroll "(((#Scroll#-#ScrollInc#)<#ScrollMin#)?#ScrollMin#:(#Scroll#-#ScrollInc#))" "#Var#"][!UpdateMeter Content1][!Redraw][!Update]
;MouseScrollDownAction=[!UpdateMeasureGroup Max][!SetVariable Scroll "(((#Scroll#+#ScrollInc#)>[mScrollMax])?[mScrollMax]:(#Scroll#+#ScrollInc#))"][!WriteKeyValue Variables Scroll "(((#Scroll#+#ScrollInc#)>[mScrollMax])?[mScrollMax]:(#Scroll#+#ScrollInc#))" "#Var#"][!UpdateMeter Content1][!Redraw][!Update]
MouseScrollUpAction=[!UpdateMeasureGroup Max][!SetVariable Scroll "(Clamp((((#Scroll#-#ScrollInc#)<#ScrollMin#)?#ScrollMin#:(#Scroll#-#ScrollInc#)),2,(#WindowHeight#-[mKnobheight]-2)))"][!WriteKeyValue Variables Scroll "(((#Scroll#-#ScrollInc#)<#ScrollMin#)?#ScrollMin#:(#Scroll#-#ScrollInc#))" "#Var#"][!UpdateMeter Content1][!Redraw][!Update]
MouseScrollDownAction=[!UpdateMeasureGroup Max][!SetVariable Scroll "(Clamp((((#Scroll#+#ScrollInc#)>[mScrollMax])?[mScrollMax]:(#Scroll#+#ScrollInc#)),2,(#WindowHeight#-[mKnobheight]-2)))"][!WriteKeyValue Variables Scroll "(((#Scroll#+#ScrollInc#)>[mScrollMax])?[mScrollMax]:(#Scroll#+#ScrollInc#))" "#Var#"][!UpdateMeter Content1][!Redraw][!Update]
MouseActionCursor=0
DynamicVariables=1
[ItemContainer]
Meter=Shape
Shape=Rectangle 0,0,220,#WindowHeight# | StrokeWidth 0 | Fill Color 255,0,0,255
Shape2=Rectangle 1,1,218,(#WindowHeight#-2) | StrokeWidth 0 | Fill Color 0,0,0,255
DynamicVariables=1
Group=BG
[ItemWindowDrag]
Meter=Shape
Shape=Rectangle 0,#WindowHeight#,220,5 | StrokeWidth 0 | Fill Color 0,255,0,255
DynamicVariables=1
LeftMouseDownAction=[!CommandMeasure mWindowDrag "Start"]
Group=BG
MouseActionCursorName=aero_ns.cur
[ScrollBarBackground]
Meter=Shape
Shape=Rectangle 0,0,30,#WindowHeight# | StrokeWidth 0 | Fill Color 255,0,0,255
Shape2=Rectangle 1,1,28,(#WindowHeight#-2) | StrokeWidth 0 | Fill Color 0,0,0,255
DynamicVariables=1
X=240
[ScrollKnob]
Meter=Shape
Shape=Rectangle 1,0,28,[mKnobheight] | StrokeWidth 0 | Fill Color 0,0,255,255
;(clamp([mKnobheight],20,#WindowHeight#))
DynamicVariables=1
X=r
Y=#Scroll#
;(clamp(#Scroll#,0,#WindowHeight#))
[Item1]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight# | StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=-#Scroll#
DynamicVariables=1
Group=Content
[Item2]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item3]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item4]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item5]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item6]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item7]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item8]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item9]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item10]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item11]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item12]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item13]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item14]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item15]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item16]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item17]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item18]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item19]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[Item20]
Meter=Shape
Shape=Rectangle 0,0,220,#ItemHeight#| StrokeWidth 0 | Fill Color 150,150,150,100
Container=ItemContainer
Y=(#ItemHeight#+#ItemSpacing#)r
[1]
Meter=String
X=110
Y=(4-#Scroll#)
Text=1
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
DynamicVariables=1
Group=Content
[2]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=2
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[3]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=3
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[4]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=4
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[5]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=5
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[6]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=6
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[7]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=7
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[8]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=8
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[9]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=9
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[10]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=10
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[11]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=11
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[12]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=12
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[13]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=13
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[14]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=14
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[15]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=15
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[16]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=16
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[17]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=17
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[18]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=18
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[19]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=19
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
[20]
Meter=String
X=r
Y=(#ItemHeight#+#ItemSpacing#)r
Text=20
FontFace=Arial
FontSize=12
FontColor=255, 255, 255, 255
AntiAlias=1
StringAlign=Center
Container=ItemContainer
a such mouse commanded skin can have the Update value set to -1, to not get it updated continuously. If there are no other details which make this impossible, take into account to replace the default Update with
([Rainmeter] section).