Page 1 of 2

!ActivateConfigGroup Bang?

Posted: February 12th, 2012, 9:34 pm
by anomalya
Hello all,

I just thought it seemed odd that there are bangs to manipulate groups within skins/measures/meters except in dealing with activating configs as a group.

(Granted, there's a bang for !DeactivateConfigGroup but none for the exact opposite?)

Basically, I would like to activate several skins at the same time without having to write out !Activate/ToggleConfig for each skin's ini file (which are at least 40 of them).

Is there a shorter way to accomplish this?

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 9:42 pm
by jsmorley
anomalya wrote:Hello all,

I just thought it seemed odd that there are bangs to manipulate groups within skins/measures/meters except in dealing with activating configs as a group.

(Granted, there's a bang for !DeactivateConfigGroup but none for the exact opposite?)

Basically, I would like to activate several skins at the same time without having to write out !Activate/ToggleConfig for each skin's ini file (which are at least 40 of them).

Is there a shorter way to accomplish this?
No, and the reason is that a "config" is not precisely identical to a "skin". A config can contain any number of skins in a single folder, however only one of them may be "active" at a time. That allows for what we call "variants" of skins that can easily be toggled between by loading for instance ClockBlack.ini or ClockWhite.ini in a single folder. Rainmeter .ini keeps track of which "variant" is loaded by the Active= number in the file. It is the number of the .ini file in alphabetical order in the folder.

So given the way configs and skins work, there is currently no way to have a bang that can load a particular skin unless you tell it the specific name of the .ini file. It is not enough to just say "load this config". That doesn't mean anything. Well, it doesn't mean enough...

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 10:02 pm
by anomalya
Thanks for the quick reply,

I see what you're saying in both instances.

My question next is how is !DeactivateConfigGroup able to call out (or rather, uncall) those "variants" specifically as a group? Couldn't the same principle be applied to activate those same variants (also categorized to a group) back?

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 10:15 pm
by jsmorley
anomalya wrote:Thanks for the quick reply,

I see what you're saying in both instances.

My question next is how is !DeactivateConfigGroup able to call out (or rather, uncall) those "variants" specifically as a group? Couldn't the same principle be applied to activate those same variants (also categorized to a group) back?
Well, unloading a skin doesn't require that the function know "which skin / variant" in a config is currently loaded. It just sets the entire config to Active=0. To load a particular skin in a config does require answering "which one?" however.

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 10:27 pm
by anomalya
I appreciate your patience and for the sake of clarity, I may have misstated my initial intention.

It's not several skins that I want activated but rather just the .ini files themselves (within a skin) - preferably as a group.

I can use !DeactivateConfigGroup easily enough to call out (or rather, uncall) those ini files but I can't apply the same principle to activate them back on.

I've read from others here and in the manual the long-hand form which is !Activate/ToggleConfig [Config] [ini file] but was hopeful perhaps of a shorter way to do so.

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 10:33 pm
by jsmorley
anomalya wrote:I appreciate your patience and for the sake of clarity, I may have misstated my initial intention.

It's not several skins that I want activated but rather just the .ini files themselves (within a skin) - preferably as a group.

I can use !DeactivateConfigGroup easily enough to call out (or rather, uncall) those ini files but I can't apply the same principle to activate them back on.

I've read from others here and in the manual the long-hand form which is !Activate/ToggleConfig [Config] [ini file] but was hopeful perhaps of a shorter way to do so.
The long and the short of my explanation though is that to load a skin will require !ActivateConfig ConfigName SkinName.ini and I can't think of anything that is going to add a useful "group" flavor to that to shorten the effort.

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 10:48 pm
by jsmorley
You might be better off to create "themes" with your various combinations of skins you want loaded or unloaded at any given time, and then just load a theme with

LeftMouseUpAction=!Execute ["#PROGRAMPATH#SkinInstaller.exe" /LoadTheme ThemeName]

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 10:55 pm
by anomalya
Ahh,

Well, one can dream. I even thought about using !WriteKeyValue (based on your prior statement) to flip the switch between Active to 0 and 1 for each ini file but I realize that's about the same, if not longer, effort than the !ActivateConfig.

In any case, I guess it's the long-hand form then - for all 40+ of them. :D

Thank you for your replies.

Re: !ActivateConfigGroup Bang?

Posted: February 12th, 2012, 11:00 pm
by jsmorley
anomalya wrote:Ahh,

Well, one can dream. I even thought about using !WriteKeyValue (based on your prior statement) to flip the switch between Active to 0 and 1 for each ini file but I realize that's about the same, if not longer, effort than the !ActivateConfig.

In any case, I guess it's the long-hand form then - for all 40+ of them. :D

Thank you for your replies.
Yeah, the only shortcut I can really think of is the /LoadTheme approach above, but that may not be what you want as it will in effect unload and restart Rainmeter with the new set of skins loaded.

Re: !ActivateConfigGroup Bang?

Posted: May 6th, 2013, 8:41 pm
by Virginityrocks
Bumping this, because I agree with OP. !ActivateConfigGroup would certainly be useful. It's variant is already dictated by its Active= in the Rainmeter.ini, and some skin folders do not contain more than 1 variant. !ActivateConfigGroup would always load variant 1 (Active=1). Most of my skin folders contain only 1 ini file. No variants. And I would rather not have to call an [!ActivateConfig "Config"] for every single one when loading multiple configs.

I think Rainmeter should have an !ActivateConfigGroup bang, with !ActivateConfigGroup [Group] [Active number, default 1]

Simply changes the active value in Rainmeter.ini to the specified value of each config with the associated group.