It is currently April 26th, 2024, 9:26 am

Scrolly Text Select For File (ini) Open in Editor [solved]

Get help with creating, editing & fixing problems with skins
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: Scrolly Text Select For File (ini) Open in Editor

Post by Yamajac »

balala wrote: December 8th, 2019, 10:21 am O.O Don't even dream such of a thing. No way for this. O.O
Oh I definitely dream of it lol. But yea, nevet gonna happen.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Scrolly Text Select For File (ini) Open in Editor

Post by Mor3bane »

Hi Yamajac, hope your still checking in here...

I have some questions about my version of your config viewer mini suite.

Where does $MouseY$ come from? And I tried to change the mouse click action to !EditSkin - as per what is in the code - which does not work by the way (my own creation mwahaha).

Also what does $ do around the MouseY variable, is that how it has some value that is not determined conventionally?

I apologise for cutting out everything nonessential - helps me navigate the code better.

I likely deleted something that IS essential, but for the life of me, I know not what.

Please run it to see what I have done visually - for me it is attractive - not sure about other peeples.

Code: Select all

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

[variables]
Spacing=21
MaxListings=21
StartY=39
Padding=5
Width=320

[RainmeterSettings]
Measure=WebParser
URL=file://C:\Users\Morbane\AppData\Roaming\Rainmeter\Rainmeter.ini
CodePage=1200
RegExp=(?s)(.*)
UpdateDivider=5
UpdateRate=1
FinishAction=[!UpdateMeasure GetConfigName][!UpdateMeterGroup ShowIt][!Redraw]

[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, 320, 36, 8

[Title]
Meter=string
StringAlign=Left
Text=Active Configs:
X=0
Y=0
Padding=25,0,129,0
Fontcolor=255,220,135,255
Container=Header
FontFace=Testamentos-Jed@
StringStyle=Normal
SolidColor=25,50,25,50
FontSize=12
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,100][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,100][!UpdateMeter Title][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,50][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,50][!UpdateMeter Title][!Redraw]
DynamicVariables=1

[Container]
Meter=Shape
DynamicVariables=1
Shape=Rectangle 0, 39, #Width#, (#Spacing# * #MaxListings#+#Padding#), 10

[Show]
Meter=string
Group=ShowIt
StringAlign=Left
text=[GetConfigName]
X=0
Padding=25,0,0,5
Y=#StartY#
W=#Width#
Container=Container
FontFace=Segoe UI
FontSize=12
FontColor=255,220,135,255
SolidColor=25,50,25,100
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,100][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,100][!UpdateMeter Title][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,50][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,50][!UpdateMeter Title][!Redraw]
MouseScrollDownAction=[!SetOption #CURRENTSECTION# Y (([#CURRENTSECTION#:H]-#StartY#+[#CURRENTSECTION#:Y]-#Padding#)<(#Spacing#*#MaxListings#+#Padding#)?[#CURRENTSECTION#:Y]:([#CURRENTSECTION#:Y]-#Spacing#))][!UpdateMeter #CURRENTSECTION#][!UpdateMeter Slider][!Redraw]
MouseScrollUpAction=[!SetOption #CURRENTSECTION# Y ((([#CURRENTSECTION#:Y]+#Spacing#)>#StartY#?#StartY#:([#CURRENTSECTION#:Y]+#Spacing#)))][!UpdateMeter #CURRENTSECTION#][!UpdateMeter Slider][!Redraw]

LeftMouseDownAction=[!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"]
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]
EDIT: Well it *does* *work*. However, the ini that opens is always the top one in the list, no matter where I have scrolled to. So that is something anyway. I have no idea how to code for this behaviour. Any further help with this is appreciated.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: Scrolly Text Select For File (ini) Open in Editor

Post by Yamajac »

Mor3bane wrote: December 8th, 2019, 7:07 pm
Where does $MouseY$ come from? And I tried to change the mouse click action to !EditSkin - as per what is in the code - which does not work by the way (my own creation mwahaha).
I would recommend reading through the docs on variables to understand how they work properly.

$MouseY$ is a Mouse Variable.

Mor3bane wrote: December 8th, 2019, 7:07 pm

Code: Select all

[Show]
LeftMouseDownAction=[!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"]
EDIT: Well it *does* *work*. However, the ini that opens is always the top one in the list, no matter where I have scrolled to. So that is something anyway. I have no idea how to code for this behaviour. Any further help with this is appreciated.


Well yea, it would only get the top one in the list if you're never telling the skin which config was clicked on lol. What you're doing in the LeftMouseUpAction is just editing whichever skin is in [ClickedConfig] but you're NEVER updating ClickedConfig with the info it actually needs to be able to process which config was clicked on.


I explained how this process works in my previous post.

Not sure what part is causing confusion for you here but just read through my post and the code I provide in the post again and hopefully it'll make sense.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Scrolly Text Select For File (ini) Open in Editor

Post by Mor3bane »

Yamajac wrote: December 8th, 2019, 9:40 pm Well yea, it would only get the top one in the list if you're never telling the skin which config was clicked on lol. What you're doing in the LeftMouseUpAction is just editing whichever skin is in [ClickedConfig] but you're NEVER updating ClickedConfig with the info it actually needs to be able to process which config was clicked on.
^^That was all I needed.

Just one more question, please; the mouse behaviour is essentially a double click then the relevant ini opens. Was that intentional, or am i just in a rapids rather than paddling in a nice calm lake?
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Scrolly Text Select For File (ini) Open in Editor

Post by Mor3bane »

OK - Like it or not, this is my working skin:

Code: Select all

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

[Metadata]
Name        = RainManager
Author      = Yamajac - Modified by Code Sapient
Information = Rainmeter Config ini Manager
Version     = Alpha/.02

[variables]
Spacing=21
MaxListings=21
StartY=39
Padding=5
Width=320

[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]

[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, #Width#, 36, 8

[Title]
Meter=string
StringAlign=Left
Text=Active Configs:
X=0
Y=0
Padding=25,0,129,0
Fontcolor=255,220,135,255
Container=Header
FontFace=Testamentos-Jed@
StringStyle=Normal
SolidColor=25,50,25,50
FontSize=12
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,100][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,100][!UpdateMeter Title][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,50][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,50][!UpdateMeter Title][!Redraw]
DynamicVariables=1

[Container]
Meter=Shape
DynamicVariables=1
Shape=Rectangle 0, 39, #Width#, (#Spacing# * #MaxListings#+#Padding#), 10

[Show]
Meter=string
Group=ShowIt
StringAlign=Left
text=[GetConfigName]
X=0
Padding=25,0,0,5
Y=#StartY#
W=#Width#
Container=Container
FontFace=Segoe UI
FontSize=12
FontColor=255,220,135,255
SolidColor=25,50,25,100
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,100][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,100][!UpdateMeter Title][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor 25,50,25,50][!UpdateMeter #CURRENTSECTION#][!SetOption Title SolidColor 25,50,25,50][!UpdateMeter Title][!Redraw]
MouseScrollDownAction=[!SetOption #CURRENTSECTION# Y (([#CURRENTSECTION#:H]-#StartY#+[#CURRENTSECTION#:Y]-#Padding#)<(#Spacing#*#MaxListings#+#Padding#)?[#CURRENTSECTION#:Y]:([#CURRENTSECTION#:Y]-#Spacing#))][!UpdateMeter #CURRENTSECTION#][!UpdateMeter Slider][!Redraw]
MouseScrollUpAction=[!SetOption #CURRENTSECTION# Y ((([#CURRENTSECTION#:Y]+#Spacing#)>#StartY#?#StartY#:([#CURRENTSECTION#:Y]+#Spacing#)))][!UpdateMeter #CURRENTSECTION#][!UpdateMeter Slider][!Redraw]

LeftMouseDownAction=[!SetVariable MouseY "($MouseY$ / #Spacing#)"][!UpdateMeasureGroup Mousers][!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"][!Refresh [ClickedConfig][!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]
THANKS Yamajac :thumbup:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.