It is currently October 15th, 2019, 8:00 pm

ConfigActive 2.2.1

Plugins and Addons popular with the Community
User avatar
jsmorley
Developer
Posts: 19558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2

jsmorley » March 27th, 2019, 4:12 pm

I have added a new feature to the 2.2 version of the ConfigActive plugin

Get the latest version in the first post of this thread

[&MeasureName:IsHidden(ConfigName)];;;;The section variable will be resolved to 1 if the config is "hidden" and -1 if not.

Example IfCondition=[&MeasureName:IsHidden(Illustro\System)] = 1

Note: DynamicVariables=1 must be set on the measure or meter where this is used.
Note: The section variable will be resolved to 0 if the config is not active.

This will allow you to use a [SectionVariable] to test for the "hidden" state of any named skin.
User avatar
jsmorley
Developer
Posts: 19558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2

jsmorley » March 27th, 2019, 4:58 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!ActivateConfig "Illustro\System" "System.ini"]

[MeasureActive]
Measure=Plugin
Plugin=ConfigActive
; Note that this measure is simply a "host" for the Inline [SectionVariable] we use later. No need to update it.
Disabled=1

[MeasureHiddenState]
Measure=String
String=[&MeasureActive:IsHidden(Illustro\System)]
DynamicVariables=1
Substitute="-1":"VISIBLE","1":"HIDDEN","0":"INACTIVE"

[MeterToggle]
Meter=String
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to hide / show Illustro\System skin
LeftMouseUpAction=[!Toggle "Illustro\System"][!Update]

[MeterHiddenState]
Meter=String
MeasureName=MeasureHiddenState
Y=5R
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=The state of Illustro\System is %1

1.png
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 8823
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2

balala » March 27th, 2019, 5:06 pm

jsmorley wrote:
March 27th, 2019, 4:12 pm
I have added a new feature to the 2.2 version of the ConfigActive plugin
Very good addition. Especially that until now detecting if a skin (config) is hidden or not was in fact impossible, this feature can be very useful in many situations.
Thank you. :great:
User avatar
jsmorley
Developer
Posts: 19558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2

jsmorley » March 27th, 2019, 5:25 pm

You are welcome...

Note that is is about the "hidden" state of a skin, and has nothing to do with "opacity".

This is always going to require a plugin to do, as it can't really be added as a built-in feature of Rainmeter.

Sure a skin can easily know its own "hidden/visible" state, and we could return that in some #CURRENTCONFIGVISIBLE# variable or some such, but there is really no way for a skin to know the state of another skin. #VARIABLES# can't have a "configname" parameter on them, and !Bangs are actions, they don't "return" a value. Building this in would really require a whole new measure "type", and yeah, that's not happening...
User avatar
balala
Rainmeter Sage
Posts: 8823
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2

balala » March 27th, 2019, 6:50 pm

jsmorley wrote:
March 27th, 2019, 5:25 pm
Note that is is about the "hidden" state of a skin, and has nothing to do with "opacity".
Obviously, these are completely different things, even if the user sees (or more precisely, don't see) the same result when hiding / setting transparent a skin.
jsmorley wrote:
March 27th, 2019, 5:25 pm
Building this in would really require a whole new measure "type", and yeah, that's not happening...
Not even needed, I think, doesn't worth to complicate things more then needed, especially if this plugin is out there.
User avatar
jsmorley
Developer
Posts: 19558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2.1

jsmorley » March 27th, 2019, 11:51 pm

Version 2.2.1 adds support for \\ (escaped slash) in the IsHidden(ConfigName) functionality.

Get the latest version in the first post of this thread
User avatar
balala
Rainmeter Sage
Posts: 8823
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

balala » March 28th, 2019, 6:41 pm

jsmorley wrote:
March 27th, 2019, 11:51 pm
Version 2.2.1 adds support for \\ (escaped slash) in the IsHidden(ConfigName) functionality.
A question: why is this needed, because in your own post, announcing the new feature of the plugin, a such config is used (Illustro\System)? The 2.2 version of the plugin already works with those slashes.
Am I missing something?
User avatar
raiguard
Posts: 642
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: ConfigActive 2.2.1

raiguard » March 28th, 2019, 7:50 pm

balala wrote:
March 28th, 2019, 6:41 pm
A question: why is this needed, because in your own post, announcing the new feature of the plugin, a such config is used (Illustro\System)? The 2.2 version of the plugin already works with those slashes.
Am I missing something?
It's actually because of me. I wanted to use this plugin in conjunction with a LUA script, but I discovered that !CommandMeasure requires you to escape backslashes. I wanted to be able to use a single variable for use in the bang and with the plugin's inline call, so I asked jsmorley to allow escaped backslashes to be used with the plugin. As far as I know, that is the only reason that the plugin supports it.

Edit: it should be noted that with the most recent revision of the script, I now handle calling the ConfigActive plugin directly from the lua script, rather than through inline plugin calls, so I actually don't need to use escaped backslashes with the plugin anymore anyway...

Edit 2: Here is a link to the script in question
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
balala
Rainmeter Sage
Posts: 8823
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ConfigActive 2.2.1

balala » March 28th, 2019, 8:02 pm

raiguard wrote:
March 28th, 2019, 7:50 pm
It's actually because of me. I wanted to use this plugin in conjunction with a LUA script, but I discovered that !CommandMeasure requires you to escape backslashes. I wanted to be able to use a single variable for use in the bang and with the plugin's inline call, so I asked jsmorley to allow escaped backslashes to be used with the plugin. As far as I know, that is the only reason that the plugin supports it.

Edit: it should be noted that with the most recent revision of the script, I now handle calling the ConfigActive plugin directly from the lua script, rather than through inline plugin calls, so I actually don't need to use escaped backslashes with the plugin anymore anyway...
Oh, ok. Just was surprised, not understanding why this feature was needed. Now I do.
User avatar
jsmorley
Developer
Posts: 19558
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ConfigActive 2.2.1

jsmorley » March 28th, 2019, 9:15 pm

Right. The support for \\ is just to be sure that if you are jumping in and out of Lua, where \ is a reserved character in pattern matching, you don't run into trouble. The point was just be sure that if you DID pass the plugin a config name with \\in it, it would handle it gracefully.