Got stuck with this one.
I creating several skins that I don't want to put into 1 skin as it will be very long.
So what I'm trying to do is load a skin by clicking on an image. (know how to do this)
That skin will do nothing except load other skins on start and close other skins on exit.
Can this be done?
It is currently April 30th, 2024, 11:18 am
Loading a Skin from a Skin
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Loading a Skin from a Skin
Last edited by CyberTheWorm on March 29th, 2017, 11:46 pm, edited 1 time in total.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Loading a Skin from a Skin
I would just put everything into OnRefreshAction and OnCloseAction in the skin.CyberTheWorm wrote:Got stuck with this one.
I creating several skins that I don't want to put into 1 skin as it will be very long.
So what I'm trying to do is load a skin by clicking on an image. (know how to do this)
That skin will do nothing except load other skins on start and close other skins on exit.
Can this be done?
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Loading a Skin from a Skin
Perfect, works like a charmjsmorley wrote:I would just put everything into OnRefreshAction and OnCloseAction in the skin.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 1173
- Joined: January 22nd, 2011, 4:23 pm
- Location: GMT +8
Re: Loading a Skin from a Skin
I've probably been away from the forum so long that I've lost track of what is possible with Rainmeter these days so come on Guys, help those of us who are more familiar with !ActivateConfig and !DeactivateConfig to use OnRefreshAction and OnCloseAction.CyberTheWorm wrote:Perfect, works like a charm
For example, how do we use OnRefreshAction and OnCloseAction to replicate or improve upon:
LeftMouseUpAction=[!ActivateConfig "#ROOTCONFIG#\MySkins" "SkinToShow.ini"] [!DeactivateConfig "#ROOTCONFIG#\MySkins" "SkinToHide.ini"]
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Loading a Skin from a Skin
The problem with that is that !DeactivateConfig doesn't require, and won't use, a skin .ini name. It simply closes whatever skin variant is currently "active" in the named config. So in your example, you are opening SkinToShow.ini in the config MySkins, and then instantly closing it.Mordasius wrote:I've probably been away from the forum so long that I've lost track of what is possible with Rainmeter these days so come on Guys, help those of us who are more familiar with !ActivateConfig and !DeactivateConfig to use OnRefreshAction and OnCloseAction.
For example, how do we use OnRefreshAction and OnCloseAction to replicate or improve upon:
LeftMouseUpAction=[!ActivateConfig "#ROOTCONFIG#\MySkins" "SkinToShow.ini"] [!DeactivateConfig "#ROOTCONFIG#\MySkins" "SkinToHide.ini"]
The example we are talking about is only easy to get right if you put all the "open" commands in OnRefreshAction, and all the "close" commands in OnCloseAction.
OnRefreshAction=[!ActivateConfig "MySkins" "SkinToShow.ini"]
OnCloseAction=[!DeactivateConfig "MySkins"]
Make no mistake, I'm not a huge fan of "parent" skins that control other skins. That must be very carefully done in my view, or you open yourself up to problems if the "parent" is not running for some reason. It can be done, but I'd probably go to some lengths to avoid that kind of design. If the user closes the parent, which closes all the children, and then exits Rainmeter, what do they have when they start Rainmeter again? In my view, the best use of !ActivateConfig is for something like a "settings" skin, that you want to open when some meter is clicked on. Trying to somehow replicate Layouts using !ActivateConfig and !DeactivateConfig would take some careful thought.
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Loading a Skin from a Skin
I did not put the skin ini file in that command and it still worked.jsmorley wrote:
The example we are talking about is only easy to get right if you put all the "open" commands in OnRefreshAction, and all the "close" commands in OnCloseAction.
OnRefreshAction=[!ActivateConfig "MySkins" "SkinToShow.ini"]
OnCloseAction=[!DeactivateConfig "MySkins"]
Code: Select all
OnRefreshAction=[!ActivateConfig "SystemInfo\Sensors\CPU"][!ActivateConfig "SystemInfo\Sensors\MB"]
OnCloseAction=[!DeactivateConfig "SystemInfo\Sensors\CPU"][!DeactivateConfig "SystemInfo\Sensors\MB"]
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Loading a Skin from a Skin
https://docs.rainmeter.net/manual-beta/bangs/#ActivateConfigCyberTheWorm wrote:I did not put the skin ini file in that command and it still worked.
Is there a reason for having in there?Code: Select all
OnRefreshAction=[!ActivateConfig "SystemInfo\Sensors\CPU"][!ActivateConfig "SystemInfo\Sensors\MB"] OnCloseAction=[!DeactivateConfig "SystemInfo\Sensors\CPU"][!DeactivateConfig "SystemInfo\Sensors\MB"]