![Hand To Head :handtohead:](./images/smilies/46_016.gif)
It is currently September 1st, 2024, 1:34 am
Merging Skins For Improved Functionality (i hope)[succeeded]
-
- Posts: 1381
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Merging Skins For Improved Functionality (i hope)
TipNote: PSRM and scripts - the code is so tight - it's too easy to mess things up ![Hand To Head :handtohead:](./images/smilies/46_016.gif)
![Hand To Head :handtohead:](./images/smilies/46_016.gif)
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 1398
- Joined: April 24th, 2021, 8:13 pm
-
- Posts: 1381
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Merging Skins For Improved Functionality (i hope)
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:
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.
Thanks
CC
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]
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 :great:](./images/smilies/dn.gif)
Thanks
CC
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 1398
- Joined: April 24th, 2021, 8:13 pm
Re: Merging Skins For Improved Functionality (i hope)
You get the config name so what's stopping you from usingCodeCode 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"
I think it can be done, but instead of using the $MouseY$, the actual container - or the string could be clicked.Code: Select all
LeftMouseDownAction=[!SetVariable MouseY "($MouseY$ / #Spacing#)"][!UpdateMeasureGroup Mousers][!EditSkin "[ClickedConfig]"][!UpdateMeasure "ClickedConfig"][!UpdateMeasure RainmeterSettings][!Redraw]
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.![]()
Thanks
CC
[!DeactivateConfig "$_"]
Do it on LeftMouseDoubleClickAction tho
from the Realm of Death
-
- Posts: 1381
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Merging Skins For Improved Functionality (i hope)
Ok, I did not explain enough.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
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?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 1398
- Joined: April 24th, 2021, 8:13 pm
Re: Merging Skins For Improved Functionality (i hope)
Replace DeactivateConfig by EditSkin?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?
[!EditSkin "$_"]
from the Realm of Death
-
- Posts: 1381
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Merging Skins For Improved Functionality (i hope)
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
Also if the scroll action is playing a part in this not perfect behavior, maybe there is a solution?
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
![Thumbs Down :thumbdown:](./images/smilies/thumbsdown.gif)
Also if the scroll action is playing a part in this not perfect behavior, maybe there is a solution?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 1398
- Joined: April 24th, 2021, 8:13 pm
Re: Merging Skins For Improved Functionality (i hope)
Make a variable ActiveConfigsCodeCode 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![]()
Also if the scroll action is playing a part in this not perfect behavior, maybe there is a solution?
Use IfMatchAction in GetConfigs.
Code: Select all
IfMatch=[#ActiveConfigs:EscapeRegExp]
IfNotMatchAction=[!WriteKeyValue Variables ActiveConfigs "[GetConfigs]"][!Refresh]
from the Realm of Death
-
- Posts: 1381
- Joined: September 7th, 2020, 2:24 pm
- Location: QLD, Australia
Re: Merging Skins For Improved Functionality (i hope)
Hey, I trtied this:death.crafter wrote: ↑September 16th, 2021, 6:10 am Make a variable ActiveConfigs
Use IfMatchAction in GetConfigs.
I just hope this worksCode: Select all
IfMatch=[#ActiveConfigs:EscapeRegExp] IfNotMatchAction=[!WriteKeyValue Variables ActiveConfigs "[GetConfigs]"][!Refresh]
![]()
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]
It crashed rainmeter. I was actually joking about liking crashing rainmeter
![Confused :confused:](./images/smilies/bn.gif)
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
-
- Rainmeter Sage
- Posts: 1398
- Joined: April 24th, 2021, 8:13 pm
Re: Merging Skins For Improved Functionality (i hope)
Why are you writing GetRainmeterSettings instead of GetConfigName.CodeCode wrote: ↑September 16th, 2021, 6:29 am Hey, I trtied this:Without the commenting.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]
It crashed rainmeter. I was actually joking about liking crashing rainmeter![]()
And I am not sure if EscapeRegExp works with variables, in which case you have to use another delimiter, like @ instead of |
from the Realm of Death