I've made a suite,
in the suite is a skin that Activates/Deactivates the other skins in the suite.
I was wondering if there was any way to leverage the information from the
"C:\Users\YourName\AppData\Roaming\Rainmeter"
The
Active=
Section.
The suite would be perfect if I could do this.
Any help is appreciated!
It is currently May 2nd, 2024, 12:37 am
Active skins?
-
- Posts: 52
- Joined: March 15th, 2013, 1:22 am
- Location: Canada
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: Active skins?
One approach would be to read Rainmeter.ini with WebParser and extract information with RegExp http://docs.rainmeter.net/tips/webparser-local-files
I expect you'll need to use Lookahead Assertions http://docs.rainmeter.net/tips/webparser-lookahead-assertions-in-regexp
I expect you'll need to use Lookahead Assertions http://docs.rainmeter.net/tips/webparser-lookahead-assertions-in-regexp
-
- Posts: 52
- Joined: March 15th, 2013, 1:22 am
- Location: Canada
Re: Active skins?
Thanks!
Although...I have no experience parsing from text files...
And I don't think this is how I'm supposed to do it, haha.
It only shows the folder, and not individual skins...
Which I could see becoming a problem since I made a
"Left-Side Skin" and a "Right-Side Skin" in the same folder.
I'm just wondering if there are any plugins or addons that could be what I'm looking for.
Although...I have no experience parsing from text files...
And I don't think this is how I'm supposed to do it, haha.
Also, in Rainmeter.ini,[PlayOnParse]
Measure=Plugin
Plugin=WebParser
Url=file://C:\Users\Ojain\AppData\Roaming\Rainmeter\Rainmeter.ini
RegExp="(?siU)<Stealthy\Play>.*<active>(.*)</active>.*</Stealthy\Play>"
[PlayOnCalc]
Measure=Calc
Formula=PlayOnParse>0?1:0
IfEqualValue=1
IfEqualAction=[!ShowMeter LPlayBoxOn]
IfBelowValue=1
IfBelowAction=[!HideMeter LPlayBoxOn]
It only shows the folder, and not individual skins...
Which I could see becoming a problem since I made a
"Left-Side Skin" and a "Right-Side Skin" in the same folder.
I'm just wondering if there are any plugins or addons that could be what I'm looking for.
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: Active skins?
I suggest you grab a copy of =[url=RainRegExphttp://rainmeter.net/forum/viewtopic.php?f=18&t=769&hilit=RainRegExp]RainRegExp[/url] to help come up with a working RegExp .alexandeu wrote:..in Rainmeter.ini, It only shows the folder, and not individual skins...Which I could see becoming a problem since I made a "Left-Side Skin" and a "Right-Side Skin" in the same folder.
I probably should have mentioned that there are more possibilities that Active=0 or Active=1. Active=2 means that the 2nd alphabetically ranked skin in the folder is active. This means that you need to change [PlayOnCalc] to:
Code: Select all
[PlayOnCalc]
Measure=Calc
Formula=PlayOnParse>0?1:0
IfAbovelValue=0
IfAboveAction=[!ShowMeter LPlayBoxOn]
IfBelowValue=1
IfBelowAction=[!HideMeter LPlayBoxOn]
Maybe there are and maybe someone else will tell us what you could use.alexandeu wrote:..I'm just wondering if there are any plugins or addons that could be what I'm looking for.
-
- Posts: 52
- Joined: March 15th, 2013, 1:22 am
- Location: Canada
Re: Active skins?
Wow, thanks! That's really helpful!
I got RainRegExp to work out what I need,
But when I implement the RegExp into my skin,
checking with a string meter, the whole thing:
I tried using "Substitute=", but I think the line-break is messing it up.
#CRLF# doesn't seem to work...
I got RainRegExp to work out what I need,
Which in RainRegExp, it gives me "Active=2"[PlayOnParse]
Measure=Plugin
Plugin=WebParser
Url=file://%UserProfile%\AppData\Roaming\Rainmeter\Rainmeter.ini
RegExp=(?siU)\[Stealthy\\Play\](.*)WindowX
But when I implement the RegExp into my skin,
checking with a string meter, the whole thing:
is what I get.[Stealthy\Play]
Active=2
WindowX
I tried using "Substitute=", but I think the line-break is messing it up.
#CRLF# doesn't seem to work...
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: Active skins?
You can use ClipString=2 and play with Width: W=20, or more/less.
-
- Posts: 52
- Joined: March 15th, 2013, 1:22 am
- Location: Canada
Re: Active skins?
I actually got it, adding "StringIndex="fonpaolo wrote:You can use ClipString=2 and play with Width: W=20, or more/less.
which got rid of "[Stealthy\Play]" and "WindowX".
and Substitute to get rid of "Active="
Thank you though
-
- Posts: 52
- Joined: March 15th, 2013, 1:22 am
- Location: Canada
Re: Active skins?
What I AM having problems now is my HighLight boxes...
Something tells me the CalcMeasure isn't doing what it's supposed to[PlayOnParse]
Measure=Plugin
Plugin=WebParser
Url=file://%UserProfile%\AppData\Roaming\Rainmeter\Rainmeter.ini
RegExp=(?siU)\[Stealthy\\Play](.*)WindowX.*
Substitute="Active=":""
StringIndex=1
[PlayOnCalc]
Measure=Calc
Formula=PlayOnParse
IfAboveValue=1
IfAboveAction=[!ShowMeter LPlayBoxOn][!HideMeter RPlayBoxOn][!Redraw]
IfEqualValue=1
IfEqualAction=[!ShowMeter RPlayBoxOn][!HideMeter LPlayBoxOn][!Redraw]
IfBelowValue=1
IfBelowAction=[!HideMeter LPlayBoxOn][!HideMeter RPlayBoxOn][!Redraw]
;OnBoxes
[LPlayBoxOn]
Meter=Image
SolidColor=40,40,40
X=(#ScreenAreaWidth#-38)
Y=12
W=18
H=36
Hidden=1
Group=On
[RPlayBoxOn]
Meter=Image
SolidColor=40,40,40
X=(#ScreenAreaWidth#-20)
Y=12
W=18
H=36
Hidden=1
Group=On
-
- Posts: 52
- Joined: March 15th, 2013, 1:22 am
- Location: Canada
Re: Active skins?
Still no luck.[Parse]
Measure=Plugin
Plugin=WebParser
Url=file://%UserProfile%\AppData\Roaming\Rainmeter\Rainmeter.ini
RegExp=(?siU)\[Stealthy\\Sound](.*)WindowX.*\[Stealthy\\Appli](.*)WindowX.*\[Stealthy\\Gmail](.*)WindowX.*\[Stealthy\\Play](.*)WindowX.*\[Stealthy\\Stat](.*)WindowX.*\[Stealthy\\Task](.*)WindowX.*\[Stealthy\\Note](.*)WindowX.*\[Stealthy\\Climate](.*)WindowX.*\[Stealthy\\Agenda](.*)WindowX.*
UpdateRate=20
[ParseSound]
Measure=Plugin
Plugin=WebParser
Url=[Parse]
Substitute="Active=":""
StringIndex=1
FinishAction=[!UpdateMeasure SoundOn]
[SoundOn]
Measure=Calc
Formula=ParseSound
IfAboveValue=1
IfAboveAction=[!ShowMeter RSoundBoxOn][!HideMeter LSoundBoxOn][!Redraw]
IfEqualValue=1
IfEqualAction=[!ShowMeter LSoundBoxOn][!HideMeter RSoundBoxOn][!Redraw]
IfBelowValue=1
IfBelowAction=[!HideMeter RSoundBoxOn][!HideMeter LSoundBoxOn][!Redraw]
I checked the log and [SoundOn] isn't getting the string value from [ParseSound],
even though any String Meter with [ParseSound] as MeasureName will give me string value...
I don't know what's wrong.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Active skins?
You are using the numeric value of the [ParseSound] child WebParser measure in the Formula of the Calc measure. That will be the same as the string value in the case of WebParser, but since the numeric value will not react to Substitute and have had the "Active=" removed from it, any Calc measure will see it as a numeric value of zero.
You need to use:
Formula=[ParseSound]
DynamicVariables=1
on the Calc measure to dynamically use the string value of [ParseSound] as a section variable, that way it will reflect the substitution.
BTW, FinishAction only has any effect when used on the parent WebParser measure. I'm not sure that makes much difference here though, since the !UpdateMeasure is really pointless in this case anyway. The Calc measure is going to update in the normal course of events in any case.
You need to use:
Formula=[ParseSound]
DynamicVariables=1
on the Calc measure to dynamically use the string value of [ParseSound] as a section variable, that way it will reflect the substitution.
BTW, FinishAction only has any effect when used on the parent WebParser measure. I'm not sure that makes much difference here though, since the !UpdateMeasure is really pointless in this case anyway. The Calc measure is going to update in the normal course of events in any case.