It is currently September 20th, 2019, 12:59 pm

Rainmeter wallpaper problems

Help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 8626
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter wallpaper problems

balala » July 30th, 2019, 8:02 pm

sockeater wrote:
July 30th, 2019, 4:13 pm
Also, I have a question about the code you provided me.
Returning to your questions:
sockeater wrote:
July 30th, 2019, 4:13 pm
1. %H format is for 24 hour correct?
Replied by jsmorley above.
sockeater wrote:
July 30th, 2019, 4:13 pm
2. [&Time] would represent the number of the hour of the clock and will change the wallpaper to imageNo7 if it was 7a.m. correct?
Right!
sockeater wrote:
July 30th, 2019, 4:13 pm
3. What does 'Fill' mean?
It's the Position parameter of the !SetWallpaper bang.
sockeater wrote:
July 30th, 2019, 4:13 pm
4. If I wanted to change it every 30 mins, would I use %H%M? If so, how would I format the image name? And how would I make it loop if I had, for example, 8 images but wanted to only use those 8 images in 30 min intervals?
sockeater wrote:
July 30th, 2019, 6:29 pm
Ok! In that case, I decided that I will use Windows 10 wallpaper slideshow instead. Question is, if I save current wallpaper to this theme, can I use a different slideshow for a different theme and when I load my current theme, will it load this particular slideshow or must I go to windows settings to adjust it? Sorry if that's confusing
Rainmeter is very good in cycling the wallpapers and jsmorley's solution described above is good enough and you can be sure it'll perfectly work for you. Don't see why you wouldn't want to use it. But finally your decision...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3543
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rainmeter wallpaper problems

eclectic-tech » July 30th, 2019, 8:23 pm

sockeater wrote:
July 30th, 2019, 6:29 pm
Ok! In that case, I decided that I will use Windows 10 wallpaper slideshow instead. Question is, if I save current wallpaper to this theme, can I use a different slideshow for a different theme and when I load my current theme, will it load this particular slideshow or must I go to windows settings to adjust it? Sorry if that's confusing
Note: You can NOT use Windows 10 Slideshow as the wallpaper, it must be a separate image. If you have Windows 10 Slideshow as your wallpaper when you save a layout and click to "Include current wallpaper", it will save just the current "slide" picture as the wallpaper. When you load the saved layout, it will load the wallpaper image you saved, but not Windows 10 Slideshow.

In order to use different wallpapers or Windows 10 Slideshow, you would need to save 2 versions of the the theme (Layout); one with "Include current wallpaper", and another that does not include the wallpaper (only the skins arrangement). You simply select the layout you want.

To create the versions, load all the skins you want to use, and set the wallpaper in Windows 10. With everything loaded and arranged, go to the "Layouts" tab in "Manage", type in a name for the layout, and click "Save". Without doing anything else, click "Include current wallpaper" and type in a NEW NAME for the layout, then click "Save".

Now you have 2 layouts of skins, one with a set wallpaper and one that will use your current Windows 10 wallpaper.

Hope this answers all your questions.
sockeater
Posts: 17
Joined: July 30th, 2019, 2:43 pm

Re: Rainmeter wallpaper problems

sockeater » July 30th, 2019, 10:03 pm

eclectic-tech wrote:
July 30th, 2019, 8:23 pm
Note: You can NOT use Windows 10 Slideshow as the wallpaper, it must be a separate image. If you have Windows 10 Slideshow as your wallpaper when you save a layout and click to "Include current wallpaper", it will save just the current "slide" picture as the wallpaper. When you load the saved layout, it will load the wallpaper image you saved, but not Windows 10 Slideshow.

In order to use different wallpapers or Windows 10 Slideshow, you would need to save 2 versions of the the theme (Layout); one with "Include current wallpaper", and another that does not include the wallpaper (only the skins arrangement). You simply select the layout you want.

To create the versions, load all the skins you want to use, and set the wallpaper in Windows 10. With everything loaded and arranged, go to the "Layouts" tab in "Manage", type in a name for the layout, and click "Save". Without doing anything else, click "Include current wallpaper" and type in a NEW NAME for the layout, then click "Save".

Now you have 2 layouts of skins, one with a set wallpaper and one that will use your current Windows 10 wallpaper.

Hope this answers all your questions.
Is it possible to switch to different layout automatically? Like say, if it turned 6 at night, it changes from afternoon theme to a dark theme.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3543
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rainmeter wallpaper problems

eclectic-tech » July 31st, 2019, 3:23 am

sockeater wrote:
July 30th, 2019, 10:03 pm
Is it possible to switch to different layout automatically? Like say, if it turned 6 at night, it changes from afternoon theme to a dark theme.
Yes, that can be done using the Time measure as described earlier, and a !LoadLayout bang.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#

; Change to a saved layout at the exact 24-hour time
[mTime]
Measure=Time
Format=%H
IfCondition=(mTime=6)
IfTrueAction=[!LoadLayout "MyMorningTheme"]
IfCondition2=(mTime=12)
IfTrueAction2=[!LoadLayout "MyAfternoonTheme"]
IfCondition3=(mTime=18)
IfTrueAction3=[!LoadLayout "MyDarkTheme"]

; All skins must have at least one meter to be valid, even if the meter does nothing
[MeterString]
Meter=String
You could add additional IfCondition tests to the [mTime] section, so it automatically change layouts at different times of the day.

Note: You would need to include this skin in every layout that is automatically loaded, so that it can load the next layout when the conditions are met.

Edit: Modified time format. The format option does not evaluate equations; only the hour is required.
sockeater
Posts: 17
Joined: July 30th, 2019, 2:43 pm

Re: Rainmeter wallpaper problems

sockeater » July 31st, 2019, 4:15 am

eclectic-tech wrote:
July 31st, 2019, 3:23 am
Yes, that can be done using the Time measure as described earlier, and a !LoadLayout bang.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#

; Change to a saved layout at the exact 24-hour time
[mTime]
Measure=Time
Format=%H+%M+%S
IfCondition=(mTime=6)
IfTrueAction=[!LoadLayout "MyMorningTheme"]
IfCondition2=(mTime=12)
IfTrueAction2=[!LoadLayout "MyAfternoonTheme"]
IfCondition3=(mTime=18)
IfTrueAction3=[!LoadLayout "MyDarkTheme"]

; All skins must have at least one meter to be valid, even if the meter does nothing
[MeterString]
Meter=String
You could add additional IfCondition tests to the [mTime] section, so it automatically change layouts at different times of the day.

Note: You would need to include this skin in every layout that is automatically loaded, so that it can load the next layout when the conditions are met.
Thanks for the help! I'll try the code and return once I need more help. I appreciate it alot!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3543
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rainmeter wallpaper problems

eclectic-tech » July 31st, 2019, 10:18 am

Happy to help :)
sockeater
Posts: 17
Joined: July 30th, 2019, 2:43 pm

Re: Rainmeter wallpaper problems

sockeater » July 31st, 2019, 11:57 pm

I thought of something but I'm not sure if it's possible. Is it possible for me to have the skin pick out a random layout in a small pool? For example, let's say I have 3 morning themes, could I get the skin to pick out a random one out of the three?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3543
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Rainmeter wallpaper problems

eclectic-tech » August 1st, 2019, 2:45 am

sockeater wrote:
July 31st, 2019, 11:57 pm
I thought of something but I'm not sure if it's possible. Is it possible for me to have the skin pick out a random layout in a small pool? For example, let's say I have 3 morning themes, could I get the skin to pick out a random one out of the three?
You could add a measure to generate a random number between 1 and 3, then use that measure in your bang to activate a random 1 of 3 morning layouts. Name your layout "MyMorningLayout1", "MyMorningLayout2", etc.

Code: Select all

[mRandom]
Measure=Calc
Formula=Random
LowBound=1
HighBound=3
DynamicVariables=1

[mTime]
Measure=Time
Format=%H%M%S
IfCondition=mTime=60000
IfTrueAction=[!LoadLayout "MyMorningLayout[%mRandom]"]
Edit: Corrected time format as suggested below. Thanks!
User avatar
balala
Rainmeter Sage
Posts: 8626
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter wallpaper problems

balala » August 1st, 2019, 6:12 am

eclectic-tech wrote:
August 1st, 2019, 2:45 am

Code: Select all

[mTime]
Measure=Time
Format=%H+%M+%S
IfCondition=mTime=600
IfTrueAction=[!LoadLayout "MyMorningLayout[%mRandom]"]
The [mTime] measure seems a little bit wrong, as it is written. Its Format option being set to Format=%H+%M+%S, it returns something like for instance 09+00+00. This isn't calculated and never will be equal to 600.
Probably the best would be to use the simpler Format=%H%M%S option and rewrite the IfCondition as it follows: IfCondition=mTime=180000
User avatar
jsmorley
Developer
Posts: 19462
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Rainmeter wallpaper problems

jsmorley » August 1st, 2019, 12:03 pm

That is correct balala.

In order to use that Format as a formula, you would need something like:

Code: Select all

[MeasureTime]
Measure=Time
Format=%H+%M+%S
IfCondition=[MeasureTime]=37
IfTrueAction=[!Log "true"]
DynamicVariables=1
At 07:02:28 the number value of the measure would not be 37, but would be 7, or just the hours. It will stop trying to evaluate it as a number as soon as it hits something non-numeric, like +. If you use MeasureTime in a Formula or IfCondition, it will use the number value.

The Format option of a Time measure does not in and of itself evaluate formulas. It simply takes what is returned and creates 1) A literal string value, and 2) a number value. (or a Timestamp). It takes what is literally returned and creates a number value until it hits something that isn't a number. Only digits, . (decimal point), and leading + - (positive and negative, not addition and subtraction) are valid parts of a "number".

The string value of the measure would be 7+02+28, and that could be used elsewhere as a formula if you evaluate the string rather than the number value by using it as a [SectionVariable] and setting DynamicVariables=1. Way more trouble than it is worth in most cases I suspect.

The string 7+02+28 numerically evaluates to 37 in a formula with the small overhead of DynamicVariables, but setting Format=%H%M%S, the pattern "070228" evaluates to the number 070228 or 70228 just fine in an IfCondition without it.

Code: Select all

[MeasureTime]
Measure=Time
Format=%H%M%S
IfCondition=MeasureTime=70228
IfTrueAction=[!Log "true"]
While you could use the string value as a formula if you really want, I'm not sure I see a case where that makes sense, given the nature of clock arithmetic, which is modular in nature and not base-10. There might be some value in flattening it out as ((hours * 3600)+(minutes * 60)+(seconds)) I guess, but even then I'm not sure how.