It is currently April 16th, 2024, 11:47 pm

Scrolling too fast

Get help with creating, editing & fixing problems with skins
User avatar
QwopJoans
Posts: 115
Joined: February 6th, 2016, 11:06 pm

Scrolling too fast

Post by QwopJoans »

So in my RainExplorer skin I just switched from using both FileView and FolderInfo to just using FileView. Before I FolderInfo was only used to count the files and folders in a given directory, and then I would combine that count as mTotalCount. Now I've figured out how to use FileView to do the same thing, but when you scroll using the scrollwheel there's a slight lag to it that causes the scrollbar to become unsynced and thus not display all the items in the directory. Any advice to kind of speed up the scrolling action to make it not lag? My working theory is that with every IndexUp or IndexDown, mPath is changing and thus mFileCount and mFolderCount are being recounted thus causing the slight lag that wasn't there with FolderInfo.

Code: Select all

[Rainmeter]
Update=-1
DefaultUpdateDivider=-1
AccurateText=1
DynamicWindowSize=1
Group=FileExplorer

MouseScrollUpAction=[!SetVariable PreviousCount "[mCurrentCount]"][!SetOption mCurrentCount Formula "[mCurrentCount] - 1"][!UpdateMeasure mCurrentCount][!UpdateMeasure mDifferenceCount][!UpdateMeasure mPath]

MouseScrollDownAction=[!SetVariable PreviousCount "[mCurrentCount]"][!SetOption mCurrentCount Formula "[mCurrentCount] + 1"][!UpdateMeasure mCurrentCount][!UpdateMeasure mDifferenceCount][!UpdateMeasure mPath]

[mPath]
Measure=Plugin
Plugin=FileView
Path=#Path#
Count=18
ShowDotDot=0
HideExtensions=#Extensions#
SortType=#SortType#
SortDateType=#SortDateType#
WildcardSearch=#Search#
Recursive=#Recursive#
ShowHidden=#Hidden#
ShowSystem=#System#
SortAscending=#SortAscending#
DynamicVariables=1
Substitute="%USERPROFILE%":"[MeasureUserName]"
FinishAction=[!UpdateMeasureGroup Children][!UpdateMeterGroup Index][!UpdateMeasure mHoverAction][!Redraw]
OnChangeAction=[!WriteKeyValue Variables Path "#Path#" "#@#\Includes\Variables.inc"][!SetOption mCurrentCount Formula "0"][!UpdateMeasure mCurrentCount][!UpdateMeasure mParentFolder][!UpdateMeterGroup Controls]

[mFileCount]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileCount
Group=Children
OnChangeAction=[!UpdateMeasure mTotalCount]

[mTotalCount]
Measure=Calc
Formula=(mFolderCount + mFileCount)
OnChangeAction=[!UpdateMeterGroup BackgroundBorder][!UpdateMeterGroup HDividers][!UpdateMeterGroup VDividers][!UpdateMeterGroup Scroll][!UpdateMeterGroup FolderHover][!UpdateMeasure mGroupHide][!Redraw]
OnUpdateAction=[!UpdateMeasure mIndex0Name]

[mCurrentCount]
Measure=Calc
Formula=0
IfCondition=(mCurrentCount < 0)
IfTrueAction=[!SetOption mCurrentCount Formula "0"][!UpdateMeasure mCurrentCount]
IfCondition2=(mCurrentCount > (mTotalCount - 18))
IfTrueAction2=[!SetOption mCurrentCount Formula "(mTotalCount - 18)"][!UpdateMeasure mCurrentCount]
OnUpdateAction=[!UpdateMeasure mScrollbar][!UpdateMeterGroup Scroll]

[mDifferenceCount]
Measure=Calc
IfCondition=(mCurrentCount < #PreviousCount#)
IfTrueAction=[!CommandMeasure mPath "IndexUp"][!SetVariable PreviousCount "(#PreviousCount# - 1)"]
IfCondition2=(mCurrentCount > #PreviousCount#)
IfTrueAction2=[!CommandMeasure mPath "IndexDown"][!SetVariable PreviousCount "(#PreviousCount# + 1)"]
IfCondition3=(mCurrentCount <> #PreviousCount#)
IfTrueAction3=[!UpdateMeasure mDifferenceCount]
IfConditionMode=1
DynamicVariables=1

[mScrollbar]
Measure=Calc
Formula=(((mTotalCount - 18) - mCurrentCount) / (mTotalCount - 18))
tjhuntley
Posts: 17
Joined: December 2nd, 2019, 3:10 pm

Re: Scrolling too fast

Post by tjhuntley »

I'm trying to figure out how to add a scrollbar into my meter. Is there a way to add this? I'm new to Rainmeter and all the codes so not sure how it works.
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: Scrolling too fast

Post by Yamajac »

Add [!Redraw] to your mwheelup/downs