Page 3 of 4

Re: Launching a skin from another skin

Posted: May 18th, 2017, 8:06 pm
by Joker73
balala wrote:Are you sure this is needed? I mean with a such option, the image shown by the skin can be distorted if it has another aspect ratio then the screen and is too big. Usually it's not a good idea to create such large skins.
Instead didn't want to change the Position parameter of the !SetWallpaper bang?
Fill option works fine, thanks!

Re: Launching a skin from another skin

Posted: May 18th, 2017, 8:23 pm
by balala
You know. But I still think that using a skin as large as the screen is not a good idea.

Re: Launching a skin from another skin

Posted: May 18th, 2017, 8:34 pm
by Joker73
balala wrote:You know. But I still think that using a skin as large as the screen is not a good idea.
Because may it cause performances issues?

Re: Launching a skin from another skin

Posted: May 18th, 2017, 8:56 pm
by balala
Joker73 wrote:Because may it cause performances issues?
In some cases maybe, but not necessary, especially if you kept the Update set to -1. But if you have a so large skin, how will you see the newly set wallpapers. At least for me it's weird. But finally you know what you wish.

Re: Launching a skin from another skin

Posted: May 19th, 2017, 7:19 am
by Joker73
balala wrote:In some cases maybe, but not necessary, especially if you kept the Update set to -1. But if you have a so large skin, how will you see the newly set wallpapers. At least for me it's weird. But finally you know what you wish.
Yup, I found this issue too. I used your code to create a image viewer instead of a wallpaper. I think I've finished my dock skin with some hidden docks. Thank you!

Re: Launching a skin from another skin

Posted: May 19th, 2017, 8:39 am
by balala
The last code definitely sets the wallpapers. You just have to reduce the size of the skin.

Re: Launching a skin from another skin

Posted: February 26th, 2018, 3:08 pm
by Cusanus
Thought this might work, but it only seems to unload the current skin, whereas, I'd like to click on a meter in the current skin and have it exchange it for another skin. After many hours, I found this and tried using this statement:

MouseUpAction[!ToggleConfig "My Projector" "SystemInfo.ini"]

MyProjector is the folder name for the two ini files, Projector.ini and SystemInfo.ini. The idea was to dump the Projector skin and load the SystemInfo skin, but all that happens is that the current skin is dumped. Is it possible to have the other ini loaded as well?

Re: Launching a skin from another skin

Posted: February 26th, 2018, 3:57 pm
by jsmorley
Here is one approach. It uses a tiny plugin I wrote called ConfigActive.

Install this example and the plugin will be installed for your use in your skins.
ToggleTwoSkins_1.0.rmskin
GIF.gif

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[CheckActive]
Measure=Plugin
Plugin=ConfigActive
Disabled=1

[MeasureToggle]
Measure=Calc
Disabled=1
UpdateDivider=-1
DynamicVariables=1
IfCondition=[&CheckActive:IsActive(ToggleTwoSkins\Skin1)]=1
IfTrueAction=[!DeactivateConfig "ToggleTwoSkins\Skin1"][!ActivateConfig "ToggleTwoSkins\Skin2" "Skin2.ini"]
IfCondition2=[&CheckActive:IsActive(ToggleTwoSkins\Skin2)]=1
IfTrueAction2=[!DeactivateConfig "ToggleTwoSkins\Skin2"][!ActivateConfig "ToggleTwoSkins\Skin1" "Skin1.ini"]
IfCondition3=([&CheckActive:IsActive(ToggleTwoSkins\Skin1)]=-1) && ([&CheckActive:IsActive(ToggleTwoSkins\Skin2)]=-1)
IfTrueAction3=[!ActivateConfig "ToggleTwoSkins\Skin1" "Skin1.ini"]

[MeterToggle]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Toggle Skins
LeftMouseUpAction=[!EnableMeasure MeasureToggle][!UpdateMeasure MeasureToggle]
This is just a simple example that toggles two skins that are in subfolders under the main ToggleTwoSkin config, but you can easily change it to check for and activate & deactivate any configs / skins you like.

It loads one of the skins if neither are active...

Details on using ConfigActive are at: https://forum.rainmeter.net/viewtopic.php?p=141968#p141968

There are certainly other approaches that might not require a plugin, but I am uncertain of how truly reliable they can be if they can't "know" that a particular config is loaded or not. Feels like you would have to make some assumptions, or brute-force a result, which can end up with some annoying error messages in the log.

Note that this requires that the skins be in different config folders. This will not work to toggle two skin .ini files that are in the same config.

Re: Launching a skin from another skin

Posted: February 26th, 2018, 4:54 pm
by raiguard
I recently wrote a LUA script for loading/unloading skins. You can specify a specific variant (INI) to toggle. The post for it is here.

Re: Launching a skin from another skin

Posted: February 26th, 2018, 4:58 pm
by jsmorley
raiguard wrote:I recently wrote a LUA script for loading/unloading skins. You can specify a specific variant (INI) to toggle. The post for it is here.
My only concern with that approach is that it makes the assumption that Rainmeter.ini is encoded as ANSI or UTF-8. That may not be true in the future, and Lua will not be able to read or parse Rainmeter.ini.

We have an interest, not fully decided yet, to encode Rainmeter.ini as UTF-16 LE, to support Unicode characters in config folder names.