It is currently March 28th, 2024, 1:30 pm

Show/Hide groups in an Included Skin

Tips and Tricks from the Rainmeter Community
Post Reply
bill98
Posts: 445
Joined: March 17th, 2011, 4:54 am

Show/Hide groups in an Included Skin

Post by bill98 »

I have a main skin (A), an Included skin (B), and a third skin (C). In skin (B) I have a Group of meters (MeterGroup Z). From skin (C), how do I !ShowMeterGroup MeterGroupZ
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Show/Hide groups in an Included Skin

Post by FreeRaider »

Read Meter bangs and remember config
bill98
Posts: 445
Joined: March 17th, 2011, 4:54 am

Re: Show/Hide groups in an Included Skin

Post by bill98 »

Several questions, since I tried several different formats and none of them worked. The manual provides no documentation of the config. In a !ShowMeterGroup does the config come before or after the group name? Are they separated by a space or? Do I include the skin name with the config? Which skin name/config do I use, skin A or skin B?

Thanks
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Show/Hide groups in an Included Skin

Post by fonpaolo »

The correct sintax is:

Code: Select all

!HideMeterGroup "YourSkinFolder\YourSkinSubFolder" "SkinB.ini"
Where:
- YourSkinFolder is the main folder containing all the other folders of your skin.
- YourSkinSubFolder is the folder containing the skin you want to "modify" (show and hide a group of meters), in this case, your skin B.
As a suggestion, better include the string in square brackets:

Code: Select all

[!HideMeterGroup "YourSkinFolder\YourSkinSubFolder" "SkinB.ini"]
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Show/Hide groups in an Included Skin

Post by jsmorley »

fonpaolo wrote:The correct sintax is:

Code: Select all

!HideMeterGroup "YourSkinFolder\YourSkinSubFolder" "SkinB.ini"
Where:
- YourSkinFolder is the main folder containing all the other folders of your skin.
- YourSkinSubFolder is the folder containing the skin you want to "modify" (show and hide a group of meters), in this case, your skin B.
As a suggestion, better include the string in square brackets:

Code: Select all

[!HideMeterGroup "YourSkinFolder\YourSkinSubFolder" "SkinB.ini"]
I'm afraid that is not correct.

The correct syntax is:

Code: Select all

[!HideMeterGroup "GroupName" "ConfigName"]
Where:
- GroupName is the named group of meters within a single, currently running skin.
- ConfigName is in essence the path, starting with the root folder of your skin, to the folder containing the currently running skin you want to impact. ConfigName is optional. If not defined, the action will take place in the running skin the bang itself is in.

So if you have a setup like:

C:\Users\YourName\Documents\Rainmeter\Skins\MySuite\MyClocks\24hrClock.ini

Rainmeter will see the ConfigName as the path starting after ..Skins\ and before \24hrClock.ini

C:\Users\YourName\Documents\Rainmeter\Skins\MySuite\MyClocks\24hrClock.ini

So the ConfigName for your clock skin would be:

MySuite\MyClocks

For the most part, you will never specify an actual skin .ini file name in a bang. The exceptions are !ActivateConfig and !ToggleConfig, where you have to specify exactly which .ini file you want to load. All other bangs only use "ConfigName", where Rainmeter doesn't care about the .ini file. The action takes place on whatever "skin" is currently loaded from the named "config".


I know that the concept of "config" vs. "skin" can take a minute to wrap your head around. The reason that this whole structure exists is to support "variants" of a skin in a single skin folder. So for instance you might have:

C:\Users\YourName\Documents\Rainmeter\Skins\MySuite\MyClocks\24hrClock.ini
C:\Users\YourName\Documents\Rainmeter\Skins\MySuite\MyClocks\12hrClock.ini

Both of those "skins" will have a "ConfigName" of MySuite\MyClocks. You can load either, but not both, of those skins at any given time, and any bangs you send to the config MySuite\MyClocks will act on whichever one is currently loaded. Bangs just don't care about "skins", they only care about "configs".

If I had a time machine, I'd go back and change this so the term "skin" didn't exist at all. It doesn't really even make sense, as you aren't "skinning" anything anyway. Really what you have in Rainmeter are "Configs" (might have called them "widgets" or "gadgets" or whatever) and within configs you have "Config Definition" files, the actual .ini variants for the config. I seem to have misplaced my time machine though, and we are where we are. Actually, If I could find that damned time machine, I'd just go back and buy, buy, buy Apple stock in 1985, and never give Rainmeter a thought on the tropical island I would now live on.

Note, don't be confused by @Included files when using bangs. When you @Include a file into a skin, no matter if you are including just some [Variables] or a big bunch of [Measures] or [Meters], all the information in the included file just becomes part of the skin that the @Include is in when the skin is running. So any bang actions you take on measures or meters or variables that are defined in the @Include file will be done on the "ConfigName" of the skin that is "using" the included file. Bangs don't know or care where the included file itself is located. An @Inlcude file is NOT a "skin" in and of itself.

You know, I think the documentation is quite clear on what parameters are required and optional for every bang, and what order they need to be in. There is also a link at the top of the bangs page that leads to what I think is a pretty decent explanation of what a Config is and how it is defined. I'm open to suggestions on how the docs could be any more clear, but really, you do have to carefully read them as you are using stuff.
bill98
Posts: 445
Joined: March 17th, 2011, 4:54 am

Re: Show/Hide groups in an Included Skin

Post by bill98 »

Thanks for your answers! If I understood correctly, the syntax for the example given should be:

!RightMouseDown Action=[!ShowMeterGroup "MeterGroupZ" "ConfigA" ]

This is included in folder C, Skin C, which is all included in the main skin folder A.

Where "MeterGroupZ" is the group name. The group is in skin B which is Included in skin A, therefore I use the config for skin A. Skin A is the main skin and the .ini file is in the top skin folder. Therefore ConfigA is the top skin folder.

Did I understand correctly, because this still doesn't show the group. If all that is clear as mud, here is a diagram.

Rainmeter
|
Skins
|
FolderA - Contains Main Skin A with @Include for skin B
|
FolderB FolderC - Contains Skins B and C, respectively

Skin B Hides MeterGroupZ and Activates skin C
Skin C Hides itself and trys to show MeterGroupZ
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy
Contact:

Re: Show/Hide groups in an Included Skin

Post by fonpaolo »

jsmorley wrote:I'm afraid that is not correct.
Of course you're right.

Next time I try to help, it's better I do only one thing at once... :oops:
I've "only" copied the wrong Bang!
bill98
Posts: 445
Joined: March 17th, 2011, 4:54 am

Re: Show/Hide groups in an Included Skin

Post by bill98 »

Anybody know the answer??????????????????????
bill98
Posts: 445
Joined: March 17th, 2011, 4:54 am

Re: Show/Hide groups in an Included Skin

Post by bill98 »

Sorry for complaining. My fault! It does work perfectly when I spell ConfigA correctly.

Thanks again for everyone's help.
Post Reply