Page 4 of 5

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 15th, 2021, 6:37 pm
by CodeCode
TipNote: PSRM and scripts - the code is so tight - it's too easy to mess things up :handtohead:

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 15th, 2021, 7:19 pm
by death.crafter
CodeCode wrote: September 15th, 2021, 6:32 pm Wow-wee-kazowie!
I think I have a working config. With tweakss needed but cosmetics mostly.
Noice...

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 3:22 am
by CodeCode
Heh. With the the whole list is parsed, the configs are showing, in shape containers, and the whole list scrolls nice and evenly. There are no half-line scroll anomalies .

The new task for me is to delve bacvk into Yamajac's code, and figure out how to click, or double click to open the ini from any given list shape.

So I think I need to make sure the parsed list can function as a clickable list. My take is Yamajac has come code in their original config list skin.

This is what I think I need to figure out:

Code: Select all

[ClickedConfig]
Measure=String
String=[GetConfigNamePath]
MinValue=[GetMouseY]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?s)([^\n]*?\n){0,[ClickedConfig:MinValue]}([^\n]*?)\n.*" : "\2"

Code: Select all

LeftMouseDownAction=[!SetVariable MouseY "($MouseY$ / #Spacing#)"][!UpdateMeasureGroup Mousers][!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"][!UpdateMeasure RainmeterSettings][!Redraw]
I think it can be done, but instead of using the $MouseY$, the actual container - or the string could be clicked.

My first idea is to add the leftmouseupaction to the string meter in the ps1 script.

I am only experimenting, so if there is a more logical way, I welcome any help. :great:

Thanks
CC

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 5:23 am
by death.crafter
CodeCode wrote: September 16th, 2021, 3:22 am Heh. With the the whole list is parsed, the configs are showing, in shape containers, and the whole list scrolls nice and evenly. There are no half-line scroll anomalies .

The new task for me is to delve bacvk into Yamajac's code, and figure out how to click, or double click to open the ini from any given list shape.

So I think I need to make sure the parsed list can function as a clickable list. My take is Yamajac has come code in their original config list skin.

This is what I think I need to figure out:

Code: Select all

[ClickedConfig]
Measure=String
String=[GetConfigNamePath]
MinValue=[GetMouseY]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?s)([^\n]*?\n){0,[ClickedConfig:MinValue]}([^\n]*?)\n.*" : "\2"

Code: Select all

LeftMouseDownAction=[!SetVariable MouseY "($MouseY$ / #Spacing#)"][!UpdateMeasureGroup Mousers][!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"][!UpdateMeasure RainmeterSettings][!Redraw]
I think it can be done, but instead of using the $MouseY$, the actual container - or the string could be clicked.

My first idea is to add the leftmouseupaction to the string meter in the ps1 script.

I am only experimenting, so if there is a more logical way, I welcome any help. :great:

Thanks
CC
You get the config name so what's stopping you from using
[!DeactivateConfig "$_"]

Do it on LeftMouseDoubleClickAction tho

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 5:37 am
by CodeCode
death.crafter wrote: September 16th, 2021, 5:23 am You get the config name so what's stopping you from using
[!DeactivateConfig "$_"]

Do it on LeftMouseDoubleClickAction tho
Ok, I did not explain enough.
I would like to open the ini file that matches the config path. I was wondering if the substitute on GetConfigName could be modified to also show the main config ini file, in the string.

Then make that container or string - either seems feasible - able to be clicked and open the ini in a/the default text editor.

The several Bangs in that example option was really only to show how the [!EditSkin "[ClickedConfig]"] was being handled by Yamajac's original code.

Does this seem doable?

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 5:39 am
by death.crafter
CodeCode wrote: September 16th, 2021, 5:37 am Ok, I did not explain enough.
I would like to open the ini file that matches the config path. I was wondering if the substitute on GetConfigName could be modified to also show the main config ini file, in the string.

Then make that container or string - either seems feasible - able to be clicked and open the ini in a/the default text editor.

The several Bangs in that example option was really only to show how the [!EditSkin "[ClickedConfig]"] was being handled by Yamajac's original code.

Does this seem doable?
Replace DeactivateConfig by EditSkin?

[!EditSkin "$_"]

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 5:50 am
by CodeCode
OMG! That totally worked! I am smiling like it was my birthday, and I got cake.

There remains one more detail: The skin opens with only the default shapes and their text. Then - I have to scroll which somehow updates things, then click refresh and everything is fine.

I just am not sure what part of the code I could insert an auto-refresh that doesn't end up in a loop - I love crashing the application :thumbdown:

Also if the scroll action is playing a part in this not perfect behavior, maybe there is a solution?

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 6:10 am
by death.crafter
CodeCode wrote: September 16th, 2021, 5:50 am OMG! That totally worked! I am smiling like it was my birthday, and I got cake.

There remains one more detail: The skin opens with only the default shapes and their text. Then - I have to scroll which somehow updates things, then click refresh and everything is fine.

I just am not sure what part of the code I could insert an auto-refresh that doesn't end up in a loop - I love crashing the application :thumbdown:

Also if the scroll action is playing a part in this not perfect behavior, maybe there is a solution?
Make a variable ActiveConfigs

Use IfMatchAction in GetConfigs.

Code: Select all

IfMatch=[#ActiveConfigs:EscapeRegExp]
IfNotMatchAction=[!WriteKeyValue Variables ActiveConfigs "[GetConfigs]"][!Refresh]
I just hope this works😅

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 6:29 am
by CodeCode
death.crafter wrote: September 16th, 2021, 6:10 am Make a variable ActiveConfigs

Use IfMatchAction in GetConfigs.

Code: Select all

IfMatch=[#ActiveConfigs:EscapeRegExp]
IfNotMatchAction=[!WriteKeyValue Variables ActiveConfigs "[GetConfigs]"][!Refresh]
I just hope this works😅
Hey, I trtied this:

Code: Select all

[GetConfigName]
Measure=String
String=[GetRainmeterSettings]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?s).*?(\[[^\n]*?\])..Active=[^0]" : "\1", "(?s)([^\n]*]).*" : "\1", "\[(.*?)]" : "\1|"
;IfMatch=[#ActiveConfigs:EscapeRegExp]
;IfNotMatchAction=[!WriteKeyValue Variables ActiveConfigs "[GetRainmeterSettings]"][!Refresh]
Without the commenting.
It crashed rainmeter. I was actually joking about liking crashing rainmeter :confused:

Re: Merging Skins For Improved Functionality (i hope)

Posted: September 16th, 2021, 6:40 am
by death.crafter
CodeCode wrote: September 16th, 2021, 6:29 am Hey, I trtied this:

Code: Select all

[GetConfigName]
Measure=String
String=[GetRainmeterSettings]
DynamicVariables=1
RegExpSubstitute=1
Substitute="(?s).*?(\[[^\n]*?\])..Active=[^0]" : "\1", "(?s)([^\n]*]).*" : "\1", "\[(.*?)]" : "\1|"
;IfMatch=[#ActiveConfigs:EscapeRegExp]
;IfNotMatchAction=[!WriteKeyValue Variables ActiveConfigs "[GetRainmeterSettings]"][!Refresh]
Without the commenting.
It crashed rainmeter. I was actually joking about liking crashing rainmeter :confused:
Why are you writing GetRainmeterSettings instead of GetConfigName.

And I am not sure if EscapeRegExp works with variables, in which case you have to use another delimiter, like @ instead of |