It is currently April 24th, 2024, 10:44 am

Launching a skin from another skin

Get help with creating, editing & fixing problems with skins
User avatar
Joker73
Posts: 14
Joined: May 17th, 2017, 6:04 pm

Re: Launching a skin from another skin

Post by Joker73 »

balala wrote:As I said above, this doesn't seem very useful, because once the skin hidden, you can't show it again, due to the fact that you can't click a hidden skin. I'd add the !ToggleFade bang to the another skin (which can be either the dock or another), keeping this way the possibility to both show and hide the weather skin. Just be careful, if you add it to the dock skin, you won't be able to load the weather skin through the dock skin if it's not, just to hide / show it, after a manual load.
What you do, depends on what you'd like.

Exactly. But it should be borne in mind that if the dock skin uses an inc file (usually) within the @Resources folder, the two copies of the skin will work with the same parameters. Probably you should replace an @Include option in one of them. For a specific advice, please post the code of that skin.
Thank you so much for your help. I've learned a lot today.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Launching a skin from another skin

Post by balala »

Joker73 wrote:Thank you so much for your help. I've learned a lot today.
You're welcome.
User avatar
Joker73
Posts: 14
Joined: May 17th, 2017, 6:04 pm

Re: Launching a skin from another skin

Post by Joker73 »

balala wrote:You're welcome.
Another question: I've set Windows 10 to change its wallpaper from the images on a folder. Can I change to the next image with a shorcut on Rainmeter?
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Launching a skin from another skin

Post by balala »

Joker73 wrote:Can I change to the next image with a shorcut on Rainmeter?
You mean clicking a skin? If yes, you can:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[MeasureRandomImage]
Measure=Plugin
Plugin=QuotePlugin
PathName=ADD HERE THE PATH OF THE DESIRED FOLDER
Subfolders=1
FileFilter=*.jpg;*.jpeg;*.jpe;*.bmp;*.gif;*.png
OnChangeAction=[!SetWallpaper "[MeasureRandomImage]"][!UpdateMeter "MeterWallpaper"][!Redraw]

[MeterWallpaper]
Meter=Image
MeasureName=MeasureRandomImage
X=0
Y=0
W=120
H=90
PreserveAspectRatio=1
LeftMouseUpAction=[!UpdateMeasure "MeasureRandomImage"]
The [MeasureRandomImage] will randomly choose one image from the folder set into the PathName option of the measure (add here the path of the desired folder, which contains the images). The OnChangeAction option will set this image as wallpaper. Be careful, the Update of the code is set to -1, which mean the skin is never updated (except the very first moment, when the skin is refreshed). Each time you click the image shown by the image meter, the [MeasureRandomImage] measure is updated (due to the LeftMouseUpAction=[!UpdateMeasure "MeasureRandomImage"] option of the [MeterWallpaper] meter), its value is changing, so its OnChangeAction option is executed. This causes setting a new wallpaper and updating the image meter as well, which now will show the updated image.
User avatar
Joker73
Posts: 14
Joined: May 17th, 2017, 6:04 pm

Re: Launching a skin from another skin

Post by Joker73 »

balala wrote:You mean clicking a skin? If yes, you can:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1

[MeasureRandomImage]
Measure=Plugin
Plugin=QuotePlugin
PathName=ADD HERE THE PATH OF THE DESIRED FOLDER
Subfolders=1
FileFilter=*.jpg;*.jpeg;*.jpe;*.bmp;*.gif;*.png
OnChangeAction=[!SetWallpaper "[MeasureRandomImage]"][!UpdateMeter "MeterWallpaper"][!Redraw]

[MeterWallpaper]
Meter=Image
MeasureName=MeasureRandomImage
X=0
Y=0
W=120
H=90
PreserveAspectRatio=1
LeftMouseUpAction=[!UpdateMeasure "MeasureRandomImage"]
The [MeasureRandomImage] will randomly choose one image from the folder set into the PathName option of the measure (add here the path of the desired folder, which contains the images). The OnChangeAction option will set this image as wallpaper. Be careful, the Update of the code is set to -1, which mean the skin is never updated (except the very first moment, when the skin is refreshed). Each time you click the image shown by the image meter, the [MeasureRandomImage] measure is updated (due to the LeftMouseUpAction=[!UpdateMeasure "MeasureRandomImage"] option of the [MeterWallpaper] meter), its value is changing, so its OnChangeAction option is executed. This causes setting a new wallpaper and updating the image meter as well, which now will show the updated image.
Thank you so much for your help! Where do I paste this code? I tried to paste it into a .ini file and loading it with rainmeter but it doesn't work. Also I tried to paste it into the code of the button of the dock but it doesn't work. Sorry if my rainmeter knowledge is frustrating.

The dock is composed by icons with this code:

[Ico8]
Meter=Image
MeterStyle=Ico2
ImageName=dropbox.png
LeftMouseUpAction=[shell:RecycleBinFolder]
RightMouseUpAction=
DymamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Launching a skin from another skin

Post by balala »

Joker73 wrote:Thank you so much for your help! Where do I paste this code? I tried to paste it into a .ini file and loading it with rainmeter but it doesn't work. Also I tried to paste it into the code of the button of the dock but it doesn't work.
As you can see in my code, it has a [Rainmeter] section and as such, it is the code of a standalone skin. Don't paste it into the code of an existing skin, but create a new one, here you can find out how.
On the other hand, I don't think you can't add the [MeasureRandomImage] measure and the [MeterWallpaper] meter to the code of your dock skin. But be careful to not add the [Rainmeter] section, too. The dock skin probably has a such section, a second one isn't needed.
No matter if you add the code to a newly created skin or to the existing Dock skin, don't forget to refresh the incriminated skin. Without a refresh, the skin won't see the newly added sections.
User avatar
Joker73
Posts: 14
Joined: May 17th, 2017, 6:04 pm

Re: Launching a skin from another skin

Post by Joker73 »

balala wrote:As you can see in my code, it has a [Rainmeter] section and as such, it is the code of a standalone skin. Don't paste it into the code of an existing skin, but create a new one, here you can find out how.
On the other hand, I don't think you can't add the [MeasureRandomImage] measure and the [MeterWallpaper] meter to the code of your dock skin. But be careful to not add the [Rainmeter] section, too. The dock skin probably has a such section, a second one isn't needed.
No matter if you add the code to a newly created skin or to the existing Dock skin, don't forget to refresh the incriminated skin. Without a refresh, the skin won't see the newly added sections.
Thanks! It works so well.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Launching a skin from another skin

Post by balala »

Joker73 wrote:Thanks! It works so well.
Have you succeeded making the skin to work?
User avatar
Joker73
Posts: 14
Joined: May 17th, 2017, 6:04 pm

Re: Launching a skin from another skin

Post by Joker73 »

balala wrote:Have you succeeded making the skin to work?
Yes. The only issue is that even though I've written the size of my screen on the X and Y lines it doesn't show the image at full screen. But as it is a image viewer I think that's got no solution.

EDIT: Solved. Now I display the image full screen by changing PreserveAspectRatio from 1 to 0.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Launching a skin from another skin

Post by balala »

Joker73 wrote:EDIT: Solved. Now I display the image full screen by changing PreserveAspectRatio from 1 to 0.
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?