It is currently March 29th, 2024, 5:13 am

Auto-Change Wallpaper Skin [Solved]

Get help with creating, editing & fixing problems with skins
Satherian
Posts: 3
Joined: November 13th, 2017, 5:30 am

Auto-Change Wallpaper Skin [Solved]

Post by Satherian »

So, I'm trying to setup a skin that will change my desktop wallpaper every 10 minutes. I'm not getting any errors, but it's also not changing the wallpaper.

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=Background Switcher
Information=Switchs background after specified time

[MeasureTime]
Measure=Time
Format=%M
IfCondition0=((MeasureTime >= 10) && (MeasureTime < 20))
IfTrueAction0=[!SetWallpaper "#@#background_0.jpg" Fill]
IfCondition1=((MeasureTime >= 20) && (MeasureTime < 30))
IfTrueAction1=[!SetWallpaper "#@#background_1.jpg" Fill]
IfCondition2=((MeasureTime >= 30) && (MeasureTime < 40))
IfTrueAction2=[!SetWallpaper "#@#background_2.jpg" Fill]
IfCondition3=((MeasureTime >= 40) && (MeasureTime < 50))
IfTrueAction3=[!SetWallpaper "#@#background_3.jpg" Fill]
IfCondition4=((MeasureTime >= 50) && (MeasureTime < 60))
IfTrueAction4=[!SetWallpaper "#@#background_4.jpg" Fill]
IfCondition5=(MeasureTime < 10)
IfTrueAction5=[!SetWallpaper "#@#background_5.jpg" Fill]

[Meter]
Meter=String
Text=""
Hidden=1
I am complete unsure what I'm doing wrong.
Last edited by Satherian on November 14th, 2017, 6:31 am, edited 2 times in total.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Auto-Change Wallpaper Skin

Post by ikarus1969 »

The first IfCondition and IfTrueAction don't need a "0" before the "=". Please try

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=Background Switcher
Information=Switchs background after specified time

[MeasureTime]
Measure=Time
Format=%M
IfCondition=((MeasureTime >= 10) && (MeasureTime < 20))
IfTrueAction=[!SetWallpaper "#@#background_0.jpg" Fill]
IfCondition2=((MeasureTime >= 20) && (MeasureTime < 30))
IfTrueAction2=[!SetWallpaper "#@#background_1.jpg" Fill]
IfCondition3=((MeasureTime >= 30) && (MeasureTime < 40))
IfTrueAction3=[!SetWallpaper "#@#background_2.jpg" Fill]
IfCondition4=((MeasureTime >= 40) && (MeasureTime < 50))
IfTrueAction4=[!SetWallpaper "#@#background_3.jpg" Fill]
IfCondition5=((MeasureTime >= 50) && (MeasureTime < 60))
IfTrueAction5=[!SetWallpaper "#@#background_4.jpg" Fill]
IfCondition6=(MeasureTime < 10)
IfTrueAction6=[!SetWallpaper "#@#background_5.jpg" Fill]

[Meter]
Meter=String
Text=""
Hidden=1
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Auto-Change Wallpaper Skin

Post by balala »

Plus, in addition to ikarus1969's post, you have to know one more thing, unmentioned by him, although in his code is fixed. Neither the IfCondition1 and IfTrueAction1 options don't exist.
Also take care to have the used images into the appropriate folder.
User avatar
tjhrulz
Developer
Posts: 267
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Auto-Change Wallpaper Skin

Post by tjhrulz »

I am not at my computer to write an example but if you have a folder that only contains the images you want to use you could use the Quote Plugin. Then it would be in a random order and it would scale automatically to any number of images.
Satherian
Posts: 3
Joined: November 13th, 2017, 5:30 am

Re: Auto-Change Wallpaper Skin

Post by Satherian »

That you for the help so far!

So, I updated the code to what was recommended (Except for the Quote plugin thing, I'm still figuring that out)

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=Background Switcher
Author=William Foster
Information=Switchs background after specified time
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[MeasureTime]
Measure=Time
Format=%#M
IfCondition=((MeasureTime >= 10) && (MeasureTime < 20))
IfTrueAction=[!SetWallpaper "#@#background_0.jpg" Fill]
IfCondition2=((MeasureTime >= 20) && (MeasureTime < 30))
IfTrueAction2=[!SetWallpaper "#@#background_1.jpg" Fill]
IfCondition3=((MeasureTime >= 30) && (MeasureTime < 40))
IfTrueAction3=[!SetWallpaper "#@#background_2.jpg" Fill]
IfCondition4=((MeasureTime >= 40) && (MeasureTime < 50))
IfTrueAction4=[!SetWallpaper "#@#background_3.jpg" Fill]
IfCondition5=((MeasureTime >= 50) && (MeasureTime < 60))
IfTrueAction5=[!SetWallpaper "#@#background_4.jpg" Fill]
IfCondition6=(MeasureTime < 10)
IfTrueAction6=[!SetWallpaper "#@#background_5.jpg" Fill]

[Meter]
Meter=String
Text=""
Hidden=1
But now I get this error:

!SetWallpaper: Unable to read file: C:\Users\fosterws\Documents\Rainmeter\Skins\WilliamCustom\@Resources\background_5.jpg


(Note: I have the 1920x1080 JPEG wallpapers in the right location, as listed in the error)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Auto-Change Wallpaper Skin

Post by balala »

Satherian wrote:But now I get this error:

!SetWallpaper: Unable to read file: C:\Users\fosterws\Documents\Rainmeter\Skins\WilliamCustom\@Resources\background_5.jpg


(Note: I have the 1920x1080 JPEG wallpapers in the right location, as listed in the error)
Are you sure there is no mistake in the name or path of the images? At least me don't know about a resolution limit with the !SetWallpaper bang. there is one?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Auto-Change Wallpaper Skin

Post by eclectic-tech »

balala wrote:Are you sure there is no mistake in the name or path of the images? At least me don't know about a resolution limit with the !SetWallpaper bang. there is one?
There is no limit to the size of the image used as wallpaper...

@Satherian

I used your code, 6 images named accordingly, and placed in the @Resources folder of my test skin...

It loads a new wallpaper for me every 10 minutes.

So, you have to have an issue related to either the names of your images, the actual location, or the type of image (.jpg, .png, .bmp, etc.)

There is nothing wrong with your code... hopefully, this will help you find the error.
Satherian
Posts: 3
Joined: November 13th, 2017, 5:30 am

Re: Auto-Change Wallpaper Skin

Post by Satherian »

Ah, I'm an idiot! I put the images in the @Resource/Images folder, when they belonged in just the @Resources folder.

Sweet! Code works perfectly! Thanks a ton for the help!
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Auto-Change Wallpaper Skin

Post by balala »

eclectic-tech wrote:There is no limit to the size of the image used as wallpaper...
This is exactly what I knew about this question.