Fill option works fine, thanks!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?
It is currently April 28th, 2024, 12:23 pm
Launching a skin from another skin
-
- Posts: 14
- Joined: May 17th, 2017, 6:04 pm
Re: Launching a skin from another skin
-
- Rainmeter Sage
- Posts: 16183
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Launching a skin from another skin
You know. But I still think that using a skin as large as the screen is not a good idea.
-
- Posts: 14
- Joined: May 17th, 2017, 6:04 pm
Re: Launching a skin from another skin
Because may it cause performances issues?balala wrote:You know. But I still think that using a skin as large as the screen is not a good idea.
-
- Rainmeter Sage
- Posts: 16183
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Launching a skin from another skin
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.Joker73 wrote:Because may it cause performances issues?
-
- Posts: 14
- Joined: May 17th, 2017, 6:04 pm
Re: Launching a skin from another skin
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!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.
-
- Rainmeter Sage
- Posts: 16183
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Launching a skin from another skin
The last code definitely sets the wallpapers. You just have to reduce the size of the skin.
-
- Posts: 10
- Joined: February 7th, 2018, 7:08 am
Re: Launching a skin from another skin
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?
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?
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Launching a skin from another skin
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.
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.
Install this example and the plugin will be installed for your use in your skins.
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]
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.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: Launching a skin from another skin
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.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Launching a skin from another skin
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.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.
We have an interest, not fully decided yet, to encode Rainmeter.ini as UTF-16 LE, to support Unicode characters in config folder names.