I have a sort of basic skin that reads the rainmeter.ini, that was originally put together by Yamajac a while back.
I am trying to modify it to list only the [SectionNames].
Yamajac is a regexp master, and I cannot figure out how to get the intended [Sections] in the rainmeter.ini.
I also thought to add another function, that counts all of the .ini files in the Skins folder.
This code is totallu hacked up, but still basically works like Yamajac originally aimed for.
My Goals are to list the active configs in a list that can scroll up and down. To list the total amount of .ini files in the skins folder, and have the list be clickable as currently configured.
There is a huge amount of space to improve what I have right now, so if something is Kludged, please help me eliminate the bad code and get these functionalities working.
Thanks for any help.
Code: Select all
[Rainmeter]
Update=-1
DefaultUpdateDivider=-1
DynamicWindowSize=1
AccurateText=1
[variables]
Spacing=18
MaxListings=15
StartY=39
Padding=22
Width=295
[MeasureUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=USER_NAME
UpdateDivider=-1
[RainmeterSettings]
Measure=WebParser
URL=file://C:\Users\[&MeasureUserName]\AppData\Roaming\Rainmeter\Rainmeter.ini
CodePage=1200
RegExp=(?s)(.*)
UpdateDivider=5
UpdateRate=1
FinishAction=[!UpdateMeasure GetConfigName][!UpdateMeterGroup ShowIt][!Redraw]
[mPath]
Measure=Plugin
Plugin=FileView
Path=#SKINSPATH#
Count=9
[mFileCount]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Type=FileCount
[GetConfigName]
Measure=String
String=[RainmeterSettings]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?s).*?(\[[^\n]*?\])..Active=[^0]" : "\1", "(?s)([^\n]*]).*" : "\1", "\[(.*?)]" : "\1#CRLF#"
[ClickedConfig]
Measure=String
String=[GetConfigName]
MinValue=[GetMouseY]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?s)([^\n]*?\n){0,[ClickedConfig:MinValue]}([^\n]*?)\n.*" : "\2"
[Header]
Meter=Shape
DynamicVariables=1
Shape=Rectangle 0, 0, 300, 40, 8
[Title]
Meter=string
StringAlign=Left
Text="ACTIVE CONFIGS: [mFileCount]"
StringEffect=Border
FontEffectColor=0,0,0,255
Padding=15,3,120,20
X=0
Y=0
Fontcolor=210,170,90,255
Container=Header
StringStyle=Normal
SolidColor=5,5,5,200
FontSize=18
DynamicVariables=1
[Container]
Meter=Shape
DynamicVariables=1
Shape=Rectangle 0, 0, 300, (#Spacing# * #MaxListings#+#Padding#), 12
[ClickVar]
Meter=Shape
DynamicVariables=1
Shape=Rectangle 254, 4, 28, 28, 14 | Fill Color 0,0,0,100 | StrokeWidth 2 | Stroke Color 200,160,65,255
LeftMouseUpAction=["C:\Users\[&MeasureUserName]\AppData\Roaming\Rainmeter\Rainmeter.ini"]
[Show]
Meter=string
Group=ShowIt
StringAlign=Left
text=[GetConfigName]
X=0
Padding=15,7,15,15
Y=45
W=295
Container=Container
FontFace=Segoe UI
FontSize=12
FontColor=210,170,90,255
SolidColor=5,5,2,200
MouseScrollDownAction=[!SetOption #CURRENTSECTION# Y (([#CURRENTSECTION#:H]-#StartY#+[#CURRENTSECTION#:Y]-#Padding#)<(#Spacing#*#MaxListings#+#Padding#)?[#CURRENTSECTION#:Y]:([#CURRENTSECTION#:Y]-#Spacing#))][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseScrollUpAction=[!SetOption #CURRENTSECTION# Y ((([#CURRENTSECTION#:Y]+#Spacing#)>#StartY#?#StartY#:([#CURRENTSECTION#:Y]+#Spacing#)))][!UpdateMeter #CURRENTSECTION#][!Redraw]
;Double-click the relevant config to access the ini file associated with it.
LeftMouseDownAction=[!SetVariable MouseY "($MouseY$ / #Spacing#)"][!UpdateMeasureGroup Mousers][!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"][!UpdateMeasure RainmeterSettings][!Redraw]
DynamicVariables=1
[GetMouseY]
Measure=Calc
Group=NoUpdate | Mousers
Disabled=1
Formula=(Ceil(#MouseY#) - 1) = -1 ? 0 : (Ceil(#MouseY#) - 1)
DynamicVariables=1
[NoUpdate]
Measure = Calc
OnUpdateAction = [!EnableMeasureGroup NoUpdate][!DisableMeasure NoUpdate]