It is currently March 28th, 2024, 2:27 pm

!SetVariable on a group of skins

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
kaamilj
Posts: 6
Joined: June 26th, 2017, 10:11 pm

!SetVariable on a group of skins

Post by kaamilj »

Hi,

I was wondering if there was a way I could use !SetVariable and reference a whole skin group or set of skins. I am trying to get one skin in my suite to affect the rest. If !SetVariable is not viable then any other way to make this happen would be appreciated.

My suite is organised as follows:

MySkin
Icons
Skin1
Skin2
...

and I would like to affect every skin inside the Icons folder.

Thanks.
Last edited by kaamilj on July 2nd, 2017, 12:10 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !SetVariable on a group of skins

Post by balala »

kaamilj wrote:I was wondering if there was a way I could use !SetVariable and reference a whole skin group or set of skins.
Doesn't have to. One single skin can be loaded from any folder, for example from the Icons folder. So, you don't have to affect each skin existing in the folder (config), you have to affect the config itself. In such cases the loaded skin of the config will be affected.
So, you have to use a this kind of bang: [!SetVariable MyVariable "TheNewValueOfTheVariable" "MySkin\Icons"]. See that the last parameter of the above bang is the name of the config (I supposed the MySkin is the root config, the folder directly placed into the Skins folder). The above bang will set the new value for the MyVariable to the loaded skin of the MySkin\Icons config.
User avatar
kaamilj
Posts: 6
Joined: June 26th, 2017, 10:11 pm

Re: !SetVariable on a group of skins

Post by kaamilj »

Thanks for the reply.

Skin1, Skin2 and so on are all separate folders (i.e. separate skins, loaded at the same time). This means that setting variable for the config MySkin\Icons does nothing since that isn't directly referring to a skin.

Thanks again.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !SetVariable on a group of skins

Post by balala »

kaamilj wrote:Skin1, Skin2 and so on are all separate folders (i.e. separate skins, loaded at the same time). This means that setting variable for the config MySkin\Icons does nothing since that isn't directly referring to a skin.
In this case, I think you have to add each config (Skin1, Skin2 and so on):
[!SetVariable MyVariable "TheNewValueOfTheVariable" "MySkin\Icons\Skin1"][!SetVariable MyVariable "TheNewValueOfTheVariable" "MySkin\Icons\Skin2"]...
User avatar
kaamilj
Posts: 6
Joined: June 26th, 2017, 10:11 pm

Re: !SetVariable on a group of skins

Post by kaamilj »

Hey, thanks for your prompt replies.

Sadly that wouldn't solve my problem either since there would be way too many skins and I do not know in advance exactly which skins would be in the folder.

However, I did find what I needed. I had tried this before but must have had a misunderstanding as to how it works. If I assign each skin a group I can use !SetVariableGroup to set the same variable for multiple skins in the same group. This solved my problem as I can specify a group for the skins.

Thanks for all your help though!
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !SetVariable on a group of skins

Post by balala »

kaamilj wrote:Sadly that wouldn't solve my problem either since there would be way too many skins and I do not know in advance exactly which skins would be in the folder.
I have the impression that you're making a confusion: if with the !SetVariable bang you want to set a value for a variable into another skin that the currently loaded one, you have to add as last parameter, the config (folder which contains the skin), not the ini file itself. Eg as I said above, the [!SetVariable MyVariable "TheNewValueOfTheVariable" "MySkin\Icons\Skin1"] bang will set the TheNewValueOfTheVariable value for the MyVariable variable into any skin contained (and obviously loaded) from the Skins\MySkin\Icons\Skin1 folder (config). Doesn't matter which one is loaded from that config, if any is, the bang will set the appropriate value for the named variable.
kaamilj wrote:Sadly that wouldn't solve my problem either since there would be way too many skins and I do not know in advance exactly which skins would be in the folder.
On the other way, setting the variable into a group of skins seems indeed a better idea. Congratulations if you could figure out how to do it.
User avatar
kaamilj
Posts: 6
Joined: June 26th, 2017, 10:11 pm

Re: !SetVariable on a group of skins

Post by kaamilj »

No, I am not making that confusion. I am aware only one skin can be loaded from a config and the loaded skin is referred to by the config. My question was if I have multiple configs in a folder if there was a way I could reference all of them at once. I may not always be using the correct term but when I say "skin" in my messages I have meant a separate config. Sorry for the confusion.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: !SetVariable on a group of skins

Post by balala »

kaamilj wrote:My question was if I have multiple configs in a folder if there was a way I could reference all of them at once.
In this case indeed setting the variable to a group of skins seems the best idea. If I'm not wrong, you've figured out how to do this, right?
User avatar
kaamilj
Posts: 6
Joined: June 26th, 2017, 10:11 pm

Re: !SetVariable on a group of skins

Post by kaamilj »

Yes, I have. Thanks :thumbup:
Post Reply