Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1486

Help: Rainmeter Skins • Re: Help with leading zeroes and counting files in a folder

$
0
0
I just tried it out and it seems to solve the problem.
Personally, I'm still not happy with the way it behaves, even though the issue is very much alleviated, so if I find a way to completely eliminate it, I'll let you know. :)
I don't like loose ends, so here's an alternative that completely eliminates loading some particular image on refresh...

Code:

[Variables]Path=#ROOTCONFIGPATH#ImagesInterval=3600[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1[Metadata]Name=PolaroidAuthor=Mifdy---Measures---[Folder]Measure=PluginPlugin=FileViewRecursive=2Path=#Path#Extensions=jpg;png;bmpFinishAction=[!UpdateMeasureGroup Folder][!UpdateMeasureGroup Random][!SetOption Image MeasureName "Name"][!UpdateMeter Image][!Redraw][Count]Group=FolderMeasure=PluginPlugin=FileViewPath=[Folder]Type=FileCountUpdateDivider=-1[Index]Group=RandomMeasure=ScriptScriptFile=Random.luaUpdateDivider=#Interval#; [Index]; Group=Random; Measure=Calc; Formula=Random; LowBound=1; HighBound=([Count]=0?1:[Count]); UpdateRandom=1; UniqueRandom=1; UpdateDivider=#Interval#; DynamicVariables=1[Name]Group=Folder|RandomMeasure=PluginPlugin=FileViewPath=[Folder]Type=FilePathIgnoreCount=1Index=[Index]UpdateDivider=#Interval#DynamicVariables=1[Caption]Measure=PluginPlugin=QuotePluginPathName=#ROOTCONFIGPATH#Caption.txtUpdateDivider=-1---Meters---[Frame]Meter=ImageX=0Y=50W=444H=530ImageName=#ROOTCONFIGPATH#@Resources\frame.png[Tape]Meter=ImageX=215Y=5W=244H=144ImageName=#ROOTCONFIGPATH#@Resources\tape.png[Scene]Meter=ImageX=28Y=85W=356H=351SolidColor=60,60,60,170[Image]Meter=ImageX=28Y=85W=356H=351PreserveAspectRatio=1UpdateDivider=#Interval#LeftMouseUpAction=[!UpdateMeasureGroup Random][!UpdateMeter Image][!Redraw]DynamicVariables=1[Notes]Meter=StringMeasureName=CaptionFontSize=30SolidColor=0,0,0,1StringAlign=leftFontColor=0,0,0,250FontFace=GINETTEClipString=1Antialias=1Angle=(Rad(-3))X=80Y=490W=310H=65LeftMouseUpAction=[#CURRENTPATH#Caption.txt]MiddleMouseUpAction=[!UpdateMeasure Caption][!UpdateMeter Notes][!Redraw]
The key above is to start with no MeasureName in [Image] on refresh, and set it afterwards via !SetOption, as soon as the folder is read. You can test what happens in 'slow motion' by temporarily removing the [!Redraw] from the FinishAction in [Folder] - it won't display a particular image until the folder is read (using no [!Redraw] was yet another method to make the previous issue occur consistently, by the way). As a bonus, I left a commented out [Index] measure that gets the random without Lua by exhausting all values before reusing them again, feel free to see if it's the Lua script equivalent or what you may need for a potential scriptless version.

Statistics: Posted by Yincognito — Today, 2:04 pm



Viewing all articles
Browse latest Browse all 1486

Trending Articles