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

Help: Switching wallpapers with a button

Get help with creating, editing & fixing problems with skins
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

Yincognito wrote: June 16th, 2020, 12:24 am
The additional code is around 80 lines, with only 2 formulas (didn't add the month name, that's on you). That being said, if you want to have the font and its size unrestricted, you might want to go step by step with balala. This is meant to be a demonstration that it's not as complicated as you thought it was (assuming you have the needed formulas).
Don't need the month on this skin, I have aonther skin just above we the current date.
What do you mean about the font ?
Yeah my problem are knowing the formulas and where to put them.
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

balala wrote: June 15th, 2020, 8:06 pm Still interested into the above "days problem"? If you are, here is a first step, done with simple Rainmeter code. I added a lot of meters and a few measures to the code of Calendar\Calendar.ini, here is what I got:

Note that with this code all month are shown with 31 days. There is further work with setting the appropriate length for months, but before I start working with it, please check the above code and let me know if it does what you are waiting for.
Nice, i've just adjusted the font and the placement.
What should I add to have the correct number of days for each month. And also to have the few days of the precedent and/or next month appearing on the calendar depending on the current month. Basically filling the 42 spots with month days (precedent/current/next)
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help: Switching wallpapers with a button

Post by Yincognito »

Mino_el_Nukenin wrote: June 16th, 2020, 2:22 pmAnd as I see yours codes it's indeed not a common an easy code to handle.
I'll let that for a moment and concentrate on other skins I can handle solo for now.

So far I have the whole design and some features I wanted (year/ week of the year number / day of the year number) and the weekdays.
As you can see in the pic : I still need the most important part, the days number.
Mino_el_Nukenin wrote: June 16th, 2020, 2:36 pm Don't need the month on this skin, I have aonther skin just above we the current date.
What do you mean about the font ?
Yeah my problem are knowing the formulas and where to put them.
Regarding the font: since in my sample the month days are a single string (i.e. the whole month string), the spacing between the day numbers are not as easy to handle as if each day number was a separate / individual meter, and some "pre-conditions" are recommended. It's basically about monospaced fonts versus proportional fonts, and the fact that in monospaced fonts, since each character has the same width I can use spaces to "align" the day numbers under each other. In proportional fonts, the width of a character depends on the character itself (for example, the digit '1' will be thinner than the digit '0', generally), which means that aligning things in a single multiline string becomes trickier (but not impossible though). Also, that process is further hampered by the fact that even if one does this for a particular proportional font, another proportional font might have entirely different characteristics regarding spacing / kerning / etc.

On the number of days in a month, the formula is right in front of you, in [MS_Rainmeter_ActiveMonthDays] (I should have used "current" instead of "active" in those measures, but I was to lazy to modify the pasted code from my skin, where the active date isn't necessarily the same with the current date).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: June 16th, 2020, 2:53 pm What should I add to have the correct number of days for each month. And also to have the few days of the precedent and/or next month appearing on the calendar depending on the current month. Basically filling the 42 spots with month days (precedent/current/next)
Ok, I'm working on it.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: June 16th, 2020, 2:53 pm What should I add to have the correct number of days for each month. And also to have the few days of the precedent and/or next month appearing on the calendar depending on the current month. Basically filling the 42 spots with month days (precedent/current/next)
The problem of days of precedent month is still not solved, but at least the days of the next month are. Here is the updated code. Still have to work on it, but this gonna happen only tomorrow.

Code: Select all

[Rainmeter]
Update=1000
SkinWidth=250
SkinHeight=160
AccurateText=1
Group=Module

[Metadata]
Name= Calendar
Author=Fonpaolo | Mino
Information= Displays a calendar | Show day of the week | Show year | Show week number | Show day number of the year
Version=3
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
@include=#@#\Config.inc
MyVar=0
MonthCount=0
MouseAction0=[!SetVariable MyVar "1"][!UpdateMeasure "MeasureMyVar"][!Redraw][!ShowMeterGroup "Calendar"][!ShowMeterGroup Calendar]
MouseAction1=[!SetVariable MyVar "0"][!UpdateMeasure "MeasureMyVar"][!Redraw][!HideMeterGroup "Calendar"][!HideMeterGroup Calendar]

[DayStringStyle]
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
Hidden=1
Group=Calendar
;UpdateDivider=-1
DynamicVariables=1

;=== TEXT STYLES ===================================================

[TextStyleWeekDay]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=11
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

[TextStyleYear]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=14
StringAlign=Center
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

[TextStyleWeekNumber]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=10
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

[TextStyleDayNumber]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=10
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

;=== MEASURES ======================================================
;--- Measure Button ------------------------------------------------
[MeasureMyVar]
Measure=Calc
Formula=#MyVar#
IfCondition=(#CURRENTSECTION#=1)
UpdateDivider=-1
DynamicVariables=1

;--- Measure Year --------------------------------------------------
[MeasureYear]
Measure=Time
Format=%Y
UpdateDivider=-1

;--- Measure Week of the year Number -------------------------------

[MeasureWeekNumber]
Measure=Time
Format=%V
UpdateDivider=-1

;--- Measure Day of the year Number -------------------------------
[MeasureDayNumber]
Measure=Time
Format=%#j
UpdateDivider=-1

;=== METERS ========================================================
;--- Meter Calendar Background -------------------------------------

[MeterCalendar]
Meter=Image
ImageName=#@#\Images\Calendar\Calendar.png
Y=5
Antialias=1
DynamicVariables=1
Hidden=1
Group=Calendar

;--- Meter Main Button ---------------------------------------------

[MeterImage]
Meter=Button
ButtonImage=#@#\Images\Calendar\Button #MyVar#.png
X=219r
Y=-4r
Antialias=1
LeftMouseUpAction=[#MouseAction[#MyVar]]
DynamicVariables=1

;--- Meters Weekdays -----------------------------------------------

[MeterLabelWeekDay1]
Meter=String
MeterStyle=TextStyleWeekDay
x=30
y=30
Text="Mo"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay2]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Tu"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay3]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="We"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay4]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Th"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay5]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Fr"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay6]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Sa"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay7]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Su"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

;--- Meter Year -----------------------------------------------

[MeterYear]
Meter=String
Measurename=MeasureYear
MeterStyle=TextStyleYear
x=194
y=43
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

;--- Meters Week of year Number---------------------------

[MeterWeekNumber]
Meter=String
MeterStyle=TextStyleWeekNumber
x=186
y=72
Group=Calendar
Text="Week"
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterWeekNumber2]
Meter=String
Measurename=MeasureWeekNumber
MeterStyle=TextStyleWeekNumber
x=28r
y=r
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

;--- Meters Day of year Number---------------------------

[MeterDayNumber]
Meter=String
MeterStyle=TextStyleDayNumber
x=182
y=98
Group=Calendar
Text="Day"
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterDayNumber2]
Meter=String
Measurename=MeasureDayNumber
MeterStyle=TextStyleDayNumber
x=28r
y=r
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeasureMonth]
Measure=Time
Format=%m
IfCondition=((MeasureDay1=1)&&((#CURRENTSECTION#=1)||(#CURRENTSECTION#=3)||(#CURRENTSECTION#=5)||(#CURRENTSECTION#=7)||(#CURRENTSECTION#=8)||(#CURRENTSECTION#=10)||(#CURRENTSECTION#=12)))
IfTrueAction=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "31"][!SetVariable Day32 "1"][!SetVariable Day33 "2"][!SetVariable Day34 "3"][!SetVariable Day35 "4"][!SetVariable Day36 "5"][!SetVariable Day37 "6"][!SetVariable Day38 "7"][!SetVariable Day39 "8"][!SetVariable Day40 "9"][!SetVariable Day41 "10"][!SetVariable Day42 "11"][!UpdateMeasure "MeasureDay1"]
IfCondition2=((MeasureDay1=1)&&((#CURRENTSECTION#=4)||(#CURRENTSECTION#=6)||(#CURRENTSECTION#=9)||(#CURRENTSECTION#=11)))
IfTrueAction2=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "1"][!SetVariable Day32 "2"][!SetVariable Day33 "3"][!SetVariable Day34 "4"][!SetVariable Day35 "5"][!SetVariable Day36 "6"][!SetVariable Day37 "7"][!SetVariable Day38 "8"][!SetVariable Day39 "9"][!SetVariable Day40 "10"][!SetVariable Day41 "11"][!SetVariable Day42 "12"][!UpdateMeasure "MeasureDay1"]
IfCondition3=((MeasureDay1=1)&&((#CURRENTSECTION#=2)&&((MeasureYear%4)=0)&&(((MeasureYear%100)<>0)||((MeasureYear%400)=0))))
IfTrueAction=[!SetVariable Day29 "29"][!SetVariable Day30 "1"][!SetVariable Day31 "2"][!SetVariable Day32 "3"][!SetVariable Day33 "4"][!SetVariable Day34 "5"][!SetVariable Day35 "6"][!SetVariable Day36 "7"][!SetVariable Day37 "8"][!SetVariable Day38 "9"][!SetVariable Day39 "10"][!SetVariable Day40 "11"][!SetVariable Day41 "12"][!SetVariable Day42 "13"][!UpdateMeasure "MeasureDay1"]
IfCondition4=((MeasureDay1=1)&&((#CURRENTSECTION#=2)&&(((MeasureYear%4)<>0)||((MeasureYear%100)=0))))
IfTrueAction=[!SetVariable Day29 "1"][!SetVariable Day30 "2"][!SetVariable Day31 "3"][!SetVariable Day32 "4"][!SetVariable Day33 "5"][!SetVariable Day34 "6"][!SetVariable Day35 "7"][!SetVariable Day36 "8"][!SetVariable Day37 "9"][!SetVariable Day38 "10"][!SetVariable Day39 "11"][!SetVariable Day40 "12"][!SetVariable Day41 "13"][!SetVariable Day42 "14"][!UpdateMeasure "MeasureDay1"]

[MeasureDay1]
Measure=Time
Format=%u
TimeStamp=[MeasureYear]-[MeasureMonth]-01
TimeStampFormat=%Y-%m-%d
IfCondition=(#CURRENTSECTION#=1)
IfTrueAction=[!SetOption MeterW1D1 Text "1"][!SetOption MeterW1D2 Text "2"][!SetOption MeterW1D3 Text "3"][!SetOption MeterW1D4 Text "4"][!SetOption MeterW1D5 Text "5"][!SetOption MeterW1D6 Text "6"][!SetOption MeterW1D7 Text "7"][!SetOption MeterW2D1 Text "8"][!SetOption MeterW2D2 Text "9"][!SetOption MeterW2D3 Text "10"][!SetOption MeterW2D4 Text "11"][!SetOption MeterW2D5 Text "12"][!SetOption MeterW2D6 Text "13"][!SetOption MeterW2D7 Text "14"][!SetOption MeterW3D1 Text "15"][!SetOption MeterW3D2 Text "16"][!SetOption MeterW3D3 Text "17"][!SetOption MeterW3D4 Text "18"][!SetOption MeterW3D5 Text "19"][!SetOption MeterW3D6 Text "20"][!SetOption MeterW3D7 Text "21"][!SetOption MeterW4D1 Text "22"][!SetOption MeterW4D2 Text "23"][!SetOption MeterW4D3 Text "24"][!SetOption MeterW4D4 Text "25"][!SetOption MeterW4D5 Text "26"][!SetOption MeterW4D6 Text "27"][!SetOption MeterW4D7 Text "28"][!SetOption MeterW5D1 Text "#Day29#"][!SetOption MeterW5D2 Text "#Day30#"][!SetOption MeterW5D3 Text "#Day31#"][!SetOption MeterW5D4 Text "#Day32#"][!SetOption MeterW5D5 Text "#Day33#"][!SetOption MeterW5D6 Text "#Day34#"][!SetOption MeterW5D7 Text "#Day35#"][!SetOption MeterW6D1 Text "#Day36#"][!SetOption MeterW6D2 Text "#Day37#"][!SetOption MeterW6D3 Text "#Day38#"][!SetOption MeterW6D4 Text "#Day39#"][!SetOption MeterW6D5 Text "#Day40#"][!SetOption MeterW6D6 Text "#Day41#"][!SetOption MeterW6D7 Text "#Day42#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition2=(#CURRENTSECTION#=2)
IfTrueAction2=[!SetOption MeterW1D1 Text ""][!SetOption MeterW1D2 Text "1"][!SetOption MeterW1D3 Text "2"][!SetOption MeterW1D4 Text "3"][!SetOption MeterW1D5 Text "4"][!SetOption MeterW1D6 Text "5"][!SetOption MeterW1D7 Text "6"][!SetOption MeterW2D1 Text "7"][!SetOption MeterW2D2 Text "8"][!SetOption MeterW2D3 Text "9"][!SetOption MeterW2D4 Text "10"][!SetOption MeterW2D5 Text "11"][!SetOption MeterW2D6 Text "12"][!SetOption MeterW2D7 Text "13"][!SetOption MeterW3D1 Text "14"][!SetOption MeterW3D2 Text "15"][!SetOption MeterW3D3 Text "16"][!SetOption MeterW3D4 Text "17"][!SetOption MeterW3D5 Text "18"][!SetOption MeterW3D6 Text "19"][!SetOption MeterW3D7 Text "20"][!SetOption MeterW4D1 Text "21"][!SetOption MeterW4D2 Text "22"][!SetOption MeterW4D3 Text "23"][!SetOption MeterW4D4 Text "24"][!SetOption MeterW4D5 Text "25"][!SetOption MeterW4D6 Text "26"][!SetOption MeterW4D7 Text "27"][!SetOption MeterW5D1 Text "28"][!SetOption MeterW5D2 Text "#Day29#"][!SetOption MeterW5D3 Text "#Day30#"][!SetOption MeterW5D4 Text "#Day31#"][!SetOption MeterW5D5 Text "#Day32#"][!SetOption MeterW5D6 Text "#Day33#"][!SetOption MeterW5D7 Text "#Day34#"][!SetOption MeterW6D1 Text "#Day35#"][!SetOption MeterW6D2 Text "#Day36#"][!SetOption MeterW6D3 Text "#Day37#"][!SetOption MeterW6D4 Text "#Day38#"][!SetOption MeterW6D5 Text "#Day39#"][!SetOption MeterW6D6 Text "#Day40#"][!SetOption MeterW6D7 Text "#Day41#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition3=(#CURRENTSECTION#=3)
IfTrueAction3=[!SetOption MeterW1D1 Text ""][!SetOption MeterW1D2 Text ""][!SetOption MeterW1D3 Text "1"][!SetOption MeterW1D4 Text "2"][!SetOption MeterW1D5 Text "3"][!SetOption MeterW1D6 Text "4"][!SetOption MeterW1D7 Text "5"][!SetOption MeterW2D1 Text "6"][!SetOption MeterW2D2 Text "7"][!SetOption MeterW2D3 Text "8"][!SetOption MeterW2D4 Text "9"][!SetOption MeterW2D5 Text "10"][!SetOption MeterW2D6 Text "11"][!SetOption MeterW2D7 Text "12"][!SetOption MeterW3D1 Text "13"][!SetOption MeterW3D2 Text "14"][!SetOption MeterW3D3 Text "15"][!SetOption MeterW3D4 Text "16"][!SetOption MeterW3D5 Text "17"][!SetOption MeterW3D6 Text "18"][!SetOption MeterW3D7 Text "19"][!SetOption MeterW4D1 Text "20"][!SetOption MeterW4D2 Text "21"][!SetOption MeterW4D3 Text "22"][!SetOption MeterW4D4 Text "23"][!SetOption MeterW4D5 Text "24"][!SetOption MeterW4D6 Text "25"][!SetOption MeterW4D7 Text "26"][!SetOption MeterW5D1 Text "27"][!SetOption MeterW5D2 Text "28"][!SetOption MeterW5D3 Text "#Day29#"][!SetOption MeterW5D4 Text "#Day30#"][!SetOption MeterW5D5 Text "#Day31#"][!SetOption MeterW5D6 Text "#Day32#"][!SetOption MeterW5D7 Text "#Day33#"][!SetOption MeterW6D1 Text "#Day34#"][!SetOption MeterW6D2 Text "#Day35#"][!SetOption MeterW6D3 Text "#Day36#"][!SetOption MeterW6D4 Text "#Day37#"][!SetOption MeterW6D5 Text "#Day38#"][!SetOption MeterW6D6 Text "#Day39#"][!SetOption MeterW6D7 Text "#Day40#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition4=(#CURRENTSECTION#=4)
IfTrueAction4=[!SetOption MeterW1D1 Text ""][!SetOption MeterW1D2 Text ""][!SetOption MeterW1D3 Text ""][!SetOption MeterW1D4 Text "1"][!SetOption MeterW1D5 Text "2"][!SetOption MeterW1D6 Text "3"][!SetOption MeterW1D7 Text "4"][!SetOption MeterW2D1 Text "5"][!SetOption MeterW2D2 Text "6"][!SetOption MeterW2D3 Text "7"][!SetOption MeterW2D4 Text "8"][!SetOption MeterW2D5 Text "9"][!SetOption MeterW2D6 Text "10"][!SetOption MeterW2D7 Text "11"][!SetOption MeterW3D1 Text "12"][!SetOption MeterW3D2 Text "13"][!SetOption MeterW3D3 Text "14"][!SetOption MeterW3D4 Text "15"][!SetOption MeterW3D5 Text "16"][!SetOption MeterW3D6 Text "17"][!SetOption MeterW3D7 Text "18"][!SetOption MeterW4D1 Text "19"][!SetOption MeterW4D2 Text "20"][!SetOption MeterW4D3 Text "21"][!SetOption MeterW4D4 Text "22"][!SetOption MeterW4D5 Text "23"][!SetOption MeterW4D6 Text "24"][!SetOption MeterW4D7 Text "25"][!SetOption MeterW5D1 Text "26"][!SetOption MeterW5D2 Text "27"][!SetOption MeterW5D3 Text "28"][!SetOption MeterW5D4 Text "#Day29#"][!SetOption MeterW5D5 Text "#Day30#"][!SetOption MeterW5D6 Text "#Day31#"][!SetOption MeterW5D7 Text "#Day32#"][!SetOption MeterW6D1 Text "#Day33#"][!SetOption MeterW6D2 Text "#Day34#"][!SetOption MeterW6D3 Text "#Day35#"][!SetOption MeterW6D4 Text "#Day36#"][!SetOption MeterW6D5 Text "#Day37#"][!SetOption MeterW6D6 Text "#Day38#"][!SetOption MeterW6D7 Text "#Day39#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition5=(#CURRENTSECTION#=5)
IfTrueAction5=[!SetOption MeterW1D1 Text ""][!SetOption MeterW1D2 Text ""][!SetOption MeterW1D3 Text ""][!SetOption MeterW1D4 Text ""][!SetOption MeterW1D5 Text "1"][!SetOption MeterW1D6 Text "2"][!SetOption MeterW1D7 Text "3"][!SetOption MeterW2D1 Text "4"][!SetOption MeterW2D2 Text "5"][!SetOption MeterW2D3 Text "6"][!SetOption MeterW2D4 Text "7"][!SetOption MeterW2D5 Text "8"][!SetOption MeterW2D6 Text "9"][!SetOption MeterW2D7 Text "10"][!SetOption MeterW3D1 Text "11"][!SetOption MeterW3D2 Text "12"][!SetOption MeterW3D3 Text "13"][!SetOption MeterW3D4 Text "14"][!SetOption MeterW3D5 Text "15"][!SetOption MeterW3D6 Text "16"][!SetOption MeterW3D7 Text "17"][!SetOption MeterW4D1 Text "18"][!SetOption MeterW4D2 Text "19"][!SetOption MeterW4D3 Text "20"][!SetOption MeterW4D4 Text "21"][!SetOption MeterW4D5 Text "22"][!SetOption MeterW4D6 Text "23"][!SetOption MeterW4D7 Text "24"][!SetOption MeterW5D1 Text "25"][!SetOption MeterW5D2 Text "26"][!SetOption MeterW5D3 Text "27"][!SetOption MeterW5D4 Text "28"][!SetOption MeterW5D5 Text "#Day29#"][!SetOption MeterW5D6 Text "#Day30#"][!SetOption MeterW5D7 Text "#Day31#"][!SetOption MeterW6D1 Text "#Day32#"][!SetOption MeterW6D2 Text "#Day33#"][!SetOption MeterW6D3 Text "#Day34#"][!SetOption MeterW6D4 Text "#Day35#"][!SetOption MeterW6D5 Text "#Day36#"][!SetOption MeterW6D6 Text "#Day37#"][!SetOption MeterW6D7 Text "#Day38#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition6=(#CURRENTSECTION#=6)
IfTrueAction6=[!SetOption MeterW1D1 Text ""][!SetOption MeterW1D2 Text ""][!SetOption MeterW1D3 Text ""][!SetOption MeterW1D4 Text ""][!SetOption MeterW1D5 Text ""][!SetOption MeterW1D6 Text "1"][!SetOption MeterW1D7 Text "2"][!SetOption MeterW2D1 Text "3"][!SetOption MeterW2D2 Text "4"][!SetOption MeterW2D3 Text "5"][!SetOption MeterW2D4 Text "6"][!SetOption MeterW2D5 Text "7"][!SetOption MeterW2D6 Text "8"][!SetOption MeterW2D7 Text "9"][!SetOption MeterW3D1 Text "10"][!SetOption MeterW3D2 Text "11"][!SetOption MeterW3D3 Text "12"][!SetOption MeterW3D4 Text "13"][!SetOption MeterW3D5 Text "14"][!SetOption MeterW3D6 Text "15"][!SetOption MeterW3D7 Text "16"][!SetOption MeterW4D1 Text "17"][!SetOption MeterW4D2 Text "18"][!SetOption MeterW4D3 Text "19"][!SetOption MeterW4D4 Text "20"][!SetOption MeterW4D5 Text "21"][!SetOption MeterW4D6 Text "22"][!SetOption MeterW4D7 Text "23"][!SetOption MeterW5D1 Text "24"][!SetOption MeterW5D2 Text "25"][!SetOption MeterW5D3 Text "26"][!SetOption MeterW5D4 Text "27"][!SetOption MeterW5D5 Text "28"][!SetOption MeterW5D6 Text "#Day29#"][!SetOption MeterW5D7 Text "#Day30#"][!SetOption MeterW6D1 Text "#Day31#"][!SetOption MeterW6D2 Text "#Day32#"][!SetOption MeterW6D3 Text "#Day33#"][!SetOption MeterW6D4 Text "#Day34#"][!SetOption MeterW6D5 Text "#Day35#"][!SetOption MeterW6D6 Text "#Day36#"][!SetOption MeterW6D7 Text "#Day37#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition7=(#CURRENTSECTION#=7)
IfTrueAction7=[!SetOption MeterW1D1 Text ""][!SetOption MeterW1D2 Text ""][!SetOption MeterW1D3 Text ""][!SetOption MeterW1D4 Text ""][!SetOption MeterW1D5 Text ""][!SetOption MeterW1D6 Text ""][!SetOption MeterW1D7 Text "1"][!SetOption MeterW2D1 Text "2"][!SetOption MeterW2D2 Text "3"][!SetOption MeterW2D3 Text "4"][!SetOption MeterW2D4 Text "5"][!SetOption MeterW2D5 Text "6"][!SetOption MeterW2D6 Text "7"][!SetOption MeterW2D7 Text "8"][!SetOption MeterW3D1 Text "9"][!SetOption MeterW3D2 Text "10"][!SetOption MeterW3D3 Text "11"][!SetOption MeterW3D4 Text "12"][!SetOption MeterW3D5 Text "13"][!SetOption MeterW3D6 Text "14"][!SetOption MeterW3D7 Text "15"][!SetOption MeterW4D1 Text "16"][!SetOption MeterW4D2 Text "17"][!SetOption MeterW4D3 Text "18"][!SetOption MeterW4D4 Text "19"][!SetOption MeterW4D5 Text "20"][!SetOption MeterW4D6 Text "21"][!SetOption MeterW4D7 Text "22"][!SetOption MeterW5D1 Text "23"][!SetOption MeterW5D2 Text "24"][!SetOption MeterW5D3 Text "25"][!SetOption MeterW5D4 Text "26"][!SetOption MeterW5D5 Text "27"][!SetOption MeterW5D6 Text "28"][!SetOption MeterW5D7 Text "#Day29#"][!SetOption MeterW6D1 Text "#Day30#"][!SetOption MeterW6D2 Text "#Day31#"][!SetOption MeterW6D3 Text "#Day32#"][!SetOption MeterW6D4 Text "#Day33#"][!SetOption MeterW6D5 Text "#Day34#"][!SetOption MeterW6D6 Text "#Day35#"][!SetOption MeterW6D7 Text "#Day36#"][!SetOption Uptime Text "#Day29#"][!UpdateMeterGroup "Calendar"][!Redraw]
DynamicVariables=1

[MeterW1D1]
Meter=STRING
MeterStyle=DayStringStyle
X=28
Y=52

[MeterW1D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW2D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW3D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW4D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW5D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r
Text=30

[MeterW5D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW6D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

balala wrote: June 16th, 2020, 8:50 pm The problem of days of precedent month is still not solved, but at least the days of the next month are. Here is the updated code. Still have to work on it, but this gonna happen only tomorrow.
Working fine so far ;)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: June 20th, 2020, 5:53 pm Working fine so far ;)
Alright. And how about this?

Code: Select all

[Rainmeter]
Update=1000
SkinWidth=250
SkinHeight=160
AccurateText=1
Group=Module

[Metadata]
Name= Calendar
Author=Fonpaolo | Mino
Information= Displays a calendar | Show day of the week | Show year | Show week number | Show day number of the year
Version=3
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Variables]
@include=#@#\Config.inc
MyVar=0
MonthCount=0
MouseAction0=[!SetVariable MyVar "1"][!UpdateMeasure "MeasureMyVar"][!Redraw][!ShowMeterGroup "Calendar"][!ShowMeterGroup Calendar]
MouseAction1=[!SetVariable MyVar "0"][!UpdateMeasure "MeasureMyVar"][!Redraw][!HideMeterGroup "Calendar"][!HideMeterGroup Calendar]

[DayStringStyle]
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,1
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
Hidden=1
Group=Calendar
;UpdateDivider=-1
DynamicVariables=1

;=== TEXT STYLES ===================================================

[TextStyleWeekDay]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=11
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

[TextStyleYear]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=14
StringAlign=Center
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

[TextStyleWeekNumber]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=10
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

[TextStyleDayNumber]
Meter=String
FontColor=255,255,255,200
FontFace=OCR A Extended
FontSize=10
StringAlign=Center
StringEffect=Shadow
FontEffectColor=0,0,0,100
AntiAlias=1

;=== MEASURES ======================================================
;--- Measure Button ------------------------------------------------
[MeasureMyVar]
Measure=Calc
Formula=#MyVar#
IfCondition=(#CURRENTSECTION#=1)
UpdateDivider=-1
DynamicVariables=1

;--- Measure Year --------------------------------------------------
[MeasureYear]
Measure=Time
Format=%Y
UpdateDivider=-1

;--- Measure Week of the year Number -------------------------------

[MeasureWeekNumber]
Measure=Time
Format=%V
UpdateDivider=-1

;--- Measure Day of the year Number -------------------------------
[MeasureDayNumber]
Measure=Time
Format=%#j
UpdateDivider=-1

;=== METERS ========================================================
;--- Meter Calendar Background -------------------------------------

[MeterCalendar]
Meter=Image
ImageName=#@#\Images\Calendar\Calendar.png
Y=5
Antialias=1
DynamicVariables=1
Hidden=1
Group=Calendar

;--- Meter Main Button ---------------------------------------------

[MeterImage]
Meter=Button
ButtonImage=#@#\Images\Calendar\Button #MyVar#.png
X=219r
Y=-4r
Antialias=1
LeftMouseUpAction=[#MouseAction[#MyVar]]
DynamicVariables=1

;--- Meters Weekdays -----------------------------------------------

[MeterLabelWeekDay1]
Meter=String
MeterStyle=TextStyleWeekDay
x=30
y=30
Text="Mo"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay2]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Tu"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay3]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="We"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay4]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Th"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay5]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Fr"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay6]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Sa"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterLabelWeekDay7]
Meter=String
MeterStyle=TextStyleWeekDay
x=21r
y=0r
Text="Su"
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

;--- Meter Year -----------------------------------------------

[MeterYear]
Meter=String
Measurename=MeasureYear
MeterStyle=TextStyleYear
x=194
y=43
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

;--- Meters Week of year Number---------------------------

[MeterWeekNumber]
Meter=String
MeterStyle=TextStyleWeekNumber
x=186
y=72
Group=Calendar
Text="Week"
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterWeekNumber2]
Meter=String
Measurename=MeasureWeekNumber
MeterStyle=TextStyleWeekNumber
x=28r
y=r
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

;--- Meters Day of year Number---------------------------

[MeterDayNumber]
Meter=String
MeterStyle=TextStyleDayNumber
x=182
y=98
Group=Calendar
Text="Day"
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeterDayNumber2]
Meter=String
Measurename=MeasureDayNumber
MeterStyle=TextStyleDayNumber
x=28r
y=r
Group=Calendar
UpdateDivider=-1
DynamicVariables=1
Hidden=1

[MeasureTime]
Measure=Time

[MeasureMonth]
Measure=Time
Format=%m
;TimeStamp=([MeasureTime:TimeStamp]+120*86400)
IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=3)||(#CURRENTSECTION#=5)||(#CURRENTSECTION#=7)||(#CURRENTSECTION#=8)||(#CURRENTSECTION#=10)||(#CURRENTSECTION#=12))
IfTrueAction=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "31"][!SetVariable Day32 "1"][!SetVariable Day33 "2"][!SetVariable Day34 "3"][!SetVariable Day35 "4"][!SetVariable Day36 "5"][!SetVariable Day37 "6"][!SetVariable Day38 "7"][!SetVariable Day39 "8"][!SetVariable Day40 "9"][!SetVariable Day41 "10"][!SetVariable Day42 "11"][!UpdateMeasure "MeasureDay1"]
IfCondition2=((#CURRENTSECTION#=4)||(#CURRENTSECTION#=6)||(#CURRENTSECTION#=9)||(#CURRENTSECTION#=11))
IfTrueAction2=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "1"][!SetVariable Day32 "2"][!SetVariable Day33 "3"][!SetVariable Day34 "4"][!SetVariable Day35 "5"][!SetVariable Day36 "6"][!SetVariable Day37 "7"][!SetVariable Day38 "8"][!SetVariable Day39 "9"][!SetVariable Day40 "10"][!SetVariable Day41 "11"][!SetVariable Day42 "12"][!UpdateMeasure "MeasureDay1"]
IfCondition3=((#CURRENTSECTION#=2)&&((MeasureYear%4)=0)&&(((MeasureYear%100)<>0)||((MeasureYear%400)=0)))
IfTrueAction3=[!SetVariable Day29 "29"][!SetVariable Day30 "1"][!SetVariable Day31 "2"][!SetVariable Day32 "3"][!SetVariable Day33 "4"][!SetVariable Day34 "5"][!SetVariable Day35 "6"][!SetVariable Day36 "7"][!SetVariable Day37 "8"][!SetVariable Day38 "9"][!SetVariable Day39 "10"][!SetVariable Day40 "11"][!SetVariable Day41 "12"][!SetVariable Day42 "13"][!UpdateMeasure "MeasureDay1"]
IfCondition4=((#CURRENTSECTION#=2)&&(((MeasureYear%4)<>0)||((MeasureYear%100)=0)))
IfTrueAction4=[!SetVariable Day29 "1"][!SetVariable Day30 "2"][!SetVariable Day31 "3"][!SetVariable Day32 "4"][!SetVariable Day33 "5"][!SetVariable Day34 "6"][!SetVariable Day35 "7"][!SetVariable Day36 "8"][!SetVariable Day37 "9"][!SetVariable Day38 "10"][!SetVariable Day39 "11"][!SetVariable Day40 "12"][!SetVariable Day41 "13"][!SetVariable Day42 "14"][!UpdateMeasure "MeasureDay1"]
;IfCondition5=((MeasureDay1=3)&&((#CURRENTSECTION#=1)||(#CURRENTSECTION#=3)||(#CURRENTSECTION#=5)||(#CURRENTSECTION#=7)||(#CURRENTSECTION#=8)||(#CURRENTSECTION#=10)||(#CURRENTSECTION#=12)))
;IfTrueAction5=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "31"][!SetVariable Day32 "1"][!SetVariable Day33 "2"][!SetVariable Day34 "3"][!SetVariable Day35 "4"][!SetVariable Day36 "5"][!SetVariable Day37 "6"][!SetVariable Day38 "7"][!SetVariable Day39 "8"][!SetVariable Day40 "9"][!SetVariable Day41 "10"][!SetVariable Day42 "11"][!UpdateMeasure "MeasureDay1"]
;IfCondition6=((MeasureDay1=3)&&((#CURRENTSECTION#=4)||(#CURRENTSECTION#=6)||(#CURRENTSECTION#=9)||(#CURRENTSECTION#=11)))
;IfTrueAction6=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "1"][!SetVariable Day32 "2"][!SetVariable Day33 "3"][!SetVariable Day34 "4"][!SetVariable Day35 "5"][!SetVariable Day36 "6"][!SetVariable Day37 "7"][!SetVariable Day38 "8"][!SetVariable Day39 "9"][!SetVariable Day40 "10"][!SetVariable Day41 "11"][!SetVariable Day42 "12"][!UpdateMeasure "MeasureDay1"]
;IfCondition7=((MeasureDay1=3)&&((#CURRENTSECTION#=2)&&((MeasureYear%4)=0)&&(((MeasureYear%100)<>0)||((MeasureYear%400)=0))))
;IfTrueAction7=[!SetVariable Day29 "29"][!SetVariable Day30 "1"][!SetVariable Day31 "2"][!SetVariable Day32 "3"][!SetVariable Day33 "4"][!SetVariable Day34 "5"][!SetVariable Day35 "6"][!SetVariable Day36 "7"][!SetVariable Day37 "8"][!SetVariable Day38 "9"][!SetVariable Day39 "10"][!SetVariable Day40 "11"][!SetVariable Day41 "12"][!SetVariable Day42 "13"][!UpdateMeasure "MeasureDay1"]
;IfCondition8=((MeasureDay1=3)&&((#CURRENTSECTION#=2)&&(((MeasureYear%4)<>0)||((MeasureYear%100)=0))))
;IfTrueAction8=[!SetVariable Day29 "1"][!SetVariable Day30 "2"][!SetVariable Day31 "3"][!SetVariable Day32 "4"][!SetVariable Day33 "5"][!SetVariable Day34 "6"][!SetVariable Day35 "7"][!SetVariable Day36 "8"][!SetVariable Day37 "9"][!SetVariable Day38 "10"][!SetVariable Day39 "11"][!SetVariable Day40 "12"][!SetVariable Day41 "13"][!SetVariable Day42 "14"][!UpdateMeasure "MeasureDay1"]
DynamicVariables=1

[MeasurePrevMonth]
Measure=Time
Format=%m
TimeStamp=([MeasureTime:TimeStamp]-[MeasureMonth]*86400)
IfCondition=((#CURRENTSECTION#=1)||(#CURRENTSECTION#=3)||(#CURRENTSECTION#=5)||(#CURRENTSECTION#=7)||(#CURRENTSECTION#=8)||(#CURRENTSECTION#=10)||(#CURRENTSECTION#=12))
IfTrueAction=[!SetVariable Day-1 "31"][!SetVariable Day-2 "30"][!SetVariable Day-3 "29"][!SetVariable Day-4 "28"][!SetVariable Day-5 "27"][!SetVariable Day-6 "26"][!SetVariable Day-7 "25"][!UpdateMeasure "MeasureDay1"]
IfCondition2=((#CURRENTSECTION#=4)||(#CURRENTSECTION#=6)||(#CURRENTSECTION#=9)||(#CURRENTSECTION#=11))
IfTrueAction2=[!SetVariable Day-1 "30"][!SetVariable Day-2 "29"][!SetVariable Day-3 "28"][!SetVariable Day-4 "27"][!SetVariable Day-5 "26"][!SetVariable Day-6 "25"][!SetVariable Day-7 "24"][!UpdateMeasure "MeasureDay1"]
IfCondition3=((#CURRENTSECTION#=2)&&((MeasureYear%4)=0)&&(((MeasureYear%100)<>0)||((MeasureYear%400)=0)))
IfTrueAction3=[!SetVariable Day-1 "29"][!SetVariable Day-2 "28"][!SetVariable Day-3 "27"][!SetVariable Day-4 "26"][!SetVariable Day-5 "25"][!SetVariable Day-6 "24"][!SetVariable Day-7 "23"][!UpdateMeasure "MeasureDay1"]
IfCondition4=((#CURRENTSECTION#=2)&&(((MeasureYear%4)<>0)||((MeasureYear%100)=0)))
IfTrueAction4=[!SetVariable Day-1 "28"][!SetVariable Day-2 "27"][!SetVariable Day-3 "26"][!SetVariable Day-4 "25"][!SetVariable Day-5 "24"][!SetVariable Day-6 "23"][!SetVariable Day-7 "22"][!UpdateMeasure "MeasureDay1"]
;IfCondition5=((MeasureDay1=3)&&((#CURRENTSECTION#=1)||(#CURRENTSECTION#=3)||(#CURRENTSECTION#=5)||(#CURRENTSECTION#=7)||(#CURRENTSECTION#=8)||(#CURRENTSECTION#=10)||(#CURRENTSECTION#=12)))
;IfTrueAction5=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "31"][!SetVariable Day32 "1"][!SetVariable Day33 "2"][!SetVariable Day34 "3"][!SetVariable Day35 "4"][!SetVariable Day36 "5"][!SetVariable Day37 "6"][!SetVariable Day38 "7"][!SetVariable Day39 "8"][!SetVariable Day40 "9"][!SetVariable Day41 "10"][!SetVariable Day42 "11"][!UpdateMeasure "MeasureDay1"]
;IfCondition6=((MeasureDay1=3)&&((#CURRENTSECTION#=4)||(#CURRENTSECTION#=6)||(#CURRENTSECTION#=9)||(#CURRENTSECTION#=11)))
;IfTrueAction6=[!SetVariable Day29 "29"][!SetVariable Day30 "30"][!SetVariable Day31 "1"][!SetVariable Day32 "2"][!SetVariable Day33 "3"][!SetVariable Day34 "4"][!SetVariable Day35 "5"][!SetVariable Day36 "6"][!SetVariable Day37 "7"][!SetVariable Day38 "8"][!SetVariable Day39 "9"][!SetVariable Day40 "10"][!SetVariable Day41 "11"][!SetVariable Day42 "12"][!UpdateMeasure "MeasureDay1"]
;IfCondition7=((MeasureDay1=3)&&((#CURRENTSECTION#=2)&&((MeasureYear%4)=0)&&(((MeasureYear%100)<>0)||((MeasureYear%400)=0))))
;IfTrueAction7=[!SetVariable Day29 "29"][!SetVariable Day30 "1"][!SetVariable Day31 "2"][!SetVariable Day32 "3"][!SetVariable Day33 "4"][!SetVariable Day34 "5"][!SetVariable Day35 "6"][!SetVariable Day36 "7"][!SetVariable Day37 "8"][!SetVariable Day38 "9"][!SetVariable Day39 "10"][!SetVariable Day40 "11"][!SetVariable Day41 "12"][!SetVariable Day42 "13"][!UpdateMeasure "MeasureDay1"]
;IfCondition8=((MeasureDay1=3)&&((#CURRENTSECTION#=2)&&(((MeasureYear%4)<>0)||((MeasureYear%100)=0))))
;IfTrueAction8=[!SetVariable Day29 "1"][!SetVariable Day30 "2"][!SetVariable Day31 "3"][!SetVariable Day32 "4"][!SetVariable Day33 "5"][!SetVariable Day34 "6"][!SetVariable Day35 "7"][!SetVariable Day36 "8"][!SetVariable Day37 "9"][!SetVariable Day38 "10"][!SetVariable Day39 "11"][!SetVariable Day40 "12"][!SetVariable Day41 "13"][!SetVariable Day42 "14"][!UpdateMeasure "MeasureDay1"]
DynamicVariables=1

[MeasureDay1]
Measure=Time
Format=%u
TimeStamp=[MeasureYear]-[MeasureMonth]-01
TimeStampFormat=%Y-%m-%d
IfCondition=(#CURRENTSECTION#=1)
IfTrueAction=[!SetOption MeterW1D1 Text "1"][!SetOption MeterW1D2 Text "2"][!SetOption MeterW1D3 Text "3"][!SetOption MeterW1D4 Text "4"][!SetOption MeterW1D5 Text "5"][!SetOption MeterW1D6 Text "6"][!SetOption MeterW1D7 Text "7"][!SetOption MeterW2D1 Text "8"][!SetOption MeterW2D2 Text "9"][!SetOption MeterW2D3 Text "10"][!SetOption MeterW2D4 Text "11"][!SetOption MeterW2D5 Text "12"][!SetOption MeterW2D6 Text "13"][!SetOption MeterW2D7 Text "14"][!SetOption MeterW3D1 Text "15"][!SetOption MeterW3D2 Text "16"][!SetOption MeterW3D3 Text "17"][!SetOption MeterW3D4 Text "18"][!SetOption MeterW3D5 Text "19"][!SetOption MeterW3D6 Text "20"][!SetOption MeterW3D7 Text "21"][!SetOption MeterW4D1 Text "22"][!SetOption MeterW4D2 Text "23"][!SetOption MeterW4D3 Text "24"][!SetOption MeterW4D4 Text "25"][!SetOption MeterW4D5 Text "26"][!SetOption MeterW4D6 Text "27"][!SetOption MeterW4D7 Text "28"][!SetOption MeterW5D1 Text "#Day29#"][!SetOption MeterW5D2 Text "#Day30#"][!SetOption MeterW5D3 Text "#Day31#"][!SetOption MeterW5D4 Text "#Day32#"][!SetOption MeterW5D5 Text "#Day33#"][!SetOption MeterW5D6 Text "#Day34#"][!SetOption MeterW5D7 Text "#Day35#"][!SetOption MeterW6D1 Text "#Day36#"][!SetOption MeterW6D2 Text "#Day37#"][!SetOption MeterW6D3 Text "#Day38#"][!SetOption MeterW6D4 Text "#Day39#"][!SetOption MeterW6D5 Text "#Day40#"][!SetOption MeterW6D6 Text "#Day41#"][!SetOption MeterW6D7 Text "#Day42#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition2=(#CURRENTSECTION#=2)
IfTrueAction2=[!SetOption MeterW1D1 Text "#Day-1#"][!SetOption MeterW1D2 Text "1"][!SetOption MeterW1D3 Text "2"][!SetOption MeterW1D4 Text "3"][!SetOption MeterW1D5 Text "4"][!SetOption MeterW1D6 Text "5"][!SetOption MeterW1D7 Text "6"][!SetOption MeterW2D1 Text "7"][!SetOption MeterW2D2 Text "8"][!SetOption MeterW2D3 Text "9"][!SetOption MeterW2D4 Text "10"][!SetOption MeterW2D5 Text "11"][!SetOption MeterW2D6 Text "12"][!SetOption MeterW2D7 Text "13"][!SetOption MeterW3D1 Text "14"][!SetOption MeterW3D2 Text "15"][!SetOption MeterW3D3 Text "16"][!SetOption MeterW3D4 Text "17"][!SetOption MeterW3D5 Text "18"][!SetOption MeterW3D6 Text "19"][!SetOption MeterW3D7 Text "20"][!SetOption MeterW4D1 Text "21"][!SetOption MeterW4D2 Text "22"][!SetOption MeterW4D3 Text "23"][!SetOption MeterW4D4 Text "24"][!SetOption MeterW4D5 Text "25"][!SetOption MeterW4D6 Text "26"][!SetOption MeterW4D7 Text "27"][!SetOption MeterW5D1 Text "28"][!SetOption MeterW5D2 Text "#Day29#"][!SetOption MeterW5D3 Text "#Day30#"][!SetOption MeterW5D4 Text "#Day31#"][!SetOption MeterW5D5 Text "#Day32#"][!SetOption MeterW5D6 Text "#Day33#"][!SetOption MeterW5D7 Text "#Day34#"][!SetOption MeterW6D1 Text "#Day35#"][!SetOption MeterW6D2 Text "#Day36#"][!SetOption MeterW6D3 Text "#Day37#"][!SetOption MeterW6D4 Text "#Day38#"][!SetOption MeterW6D5 Text "#Day39#"][!SetOption MeterW6D6 Text "#Day40#"][!SetOption MeterW6D7 Text "#Day41#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition3=(#CURRENTSECTION#=3)
IfTrueAction3=[!SetOption MeterW1D1 Text "#Day-2#"][!SetOption MeterW1D2 Text "#Day-1#"][!SetOption MeterW1D3 Text "1"][!SetOption MeterW1D4 Text "2"][!SetOption MeterW1D5 Text "3"][!SetOption MeterW1D6 Text "4"][!SetOption MeterW1D7 Text "5"][!SetOption MeterW2D1 Text "6"][!SetOption MeterW2D2 Text "7"][!SetOption MeterW2D3 Text "8"][!SetOption MeterW2D4 Text "9"][!SetOption MeterW2D5 Text "10"][!SetOption MeterW2D6 Text "11"][!SetOption MeterW2D7 Text "12"][!SetOption MeterW3D1 Text "13"][!SetOption MeterW3D2 Text "14"][!SetOption MeterW3D3 Text "15"][!SetOption MeterW3D4 Text "16"][!SetOption MeterW3D5 Text "17"][!SetOption MeterW3D6 Text "18"][!SetOption MeterW3D7 Text "19"][!SetOption MeterW4D1 Text "20"][!SetOption MeterW4D2 Text "21"][!SetOption MeterW4D3 Text "22"][!SetOption MeterW4D4 Text "23"][!SetOption MeterW4D5 Text "24"][!SetOption MeterW4D6 Text "25"][!SetOption MeterW4D7 Text "26"][!SetOption MeterW5D1 Text "27"][!SetOption MeterW5D2 Text "28"][!SetOption MeterW5D3 Text "#Day29#"][!SetOption MeterW5D4 Text "#Day30#"][!SetOption MeterW5D5 Text "#Day31#"][!SetOption MeterW5D6 Text "#Day32#"][!SetOption MeterW5D7 Text "#Day33#"][!SetOption MeterW6D1 Text "#Day34#"][!SetOption MeterW6D2 Text "#Day35#"][!SetOption MeterW6D3 Text "#Day36#"][!SetOption MeterW6D4 Text "#Day37#"][!SetOption MeterW6D5 Text "#Day38#"][!SetOption MeterW6D6 Text "#Day39#"][!SetOption MeterW6D7 Text "#Day40#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition4=(#CURRENTSECTION#=4)
IfTrueAction4=[!SetOption MeterW1D1 Text "#Day-3#"][!SetOption MeterW1D2 Text "#Day-2#"][!SetOption MeterW1D3 Text "#Day-1#"][!SetOption MeterW1D4 Text "1"][!SetOption MeterW1D5 Text "2"][!SetOption MeterW1D6 Text "3"][!SetOption MeterW1D7 Text "4"][!SetOption MeterW2D1 Text "5"][!SetOption MeterW2D2 Text "6"][!SetOption MeterW2D3 Text "7"][!SetOption MeterW2D4 Text "8"][!SetOption MeterW2D5 Text "9"][!SetOption MeterW2D6 Text "10"][!SetOption MeterW2D7 Text "11"][!SetOption MeterW3D1 Text "12"][!SetOption MeterW3D2 Text "13"][!SetOption MeterW3D3 Text "14"][!SetOption MeterW3D4 Text "15"][!SetOption MeterW3D5 Text "16"][!SetOption MeterW3D6 Text "17"][!SetOption MeterW3D7 Text "18"][!SetOption MeterW4D1 Text "19"][!SetOption MeterW4D2 Text "20"][!SetOption MeterW4D3 Text "21"][!SetOption MeterW4D4 Text "22"][!SetOption MeterW4D5 Text "23"][!SetOption MeterW4D6 Text "24"][!SetOption MeterW4D7 Text "25"][!SetOption MeterW5D1 Text "26"][!SetOption MeterW5D2 Text "27"][!SetOption MeterW5D3 Text "28"][!SetOption MeterW5D4 Text "#Day29#"][!SetOption MeterW5D5 Text "#Day30#"][!SetOption MeterW5D6 Text "#Day31#"][!SetOption MeterW5D7 Text "#Day32#"][!SetOption MeterW6D1 Text "#Day33#"][!SetOption MeterW6D2 Text "#Day34#"][!SetOption MeterW6D3 Text "#Day35#"][!SetOption MeterW6D4 Text "#Day36#"][!SetOption MeterW6D5 Text "#Day37#"][!SetOption MeterW6D6 Text "#Day38#"][!SetOption MeterW6D7 Text "#Day39#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition5=(#CURRENTSECTION#=5)
IfTrueAction5=[!SetOption MeterW1D1 Text "#Day-4#"][!SetOption MeterW1D2 Text "#Day-3#"][!SetOption MeterW1D3 Text "#Day-2#"][!SetOption MeterW1D4 Text "#Day-1#"][!SetOption MeterW1D5 Text "1"][!SetOption MeterW1D6 Text "2"][!SetOption MeterW1D7 Text "3"][!SetOption MeterW2D1 Text "4"][!SetOption MeterW2D2 Text "5"][!SetOption MeterW2D3 Text "6"][!SetOption MeterW2D4 Text "7"][!SetOption MeterW2D5 Text "8"][!SetOption MeterW2D6 Text "9"][!SetOption MeterW2D7 Text "10"][!SetOption MeterW3D1 Text "11"][!SetOption MeterW3D2 Text "12"][!SetOption MeterW3D3 Text "13"][!SetOption MeterW3D4 Text "14"][!SetOption MeterW3D5 Text "15"][!SetOption MeterW3D6 Text "16"][!SetOption MeterW3D7 Text "17"][!SetOption MeterW4D1 Text "18"][!SetOption MeterW4D2 Text "19"][!SetOption MeterW4D3 Text "20"][!SetOption MeterW4D4 Text "21"][!SetOption MeterW4D5 Text "22"][!SetOption MeterW4D6 Text "23"][!SetOption MeterW4D7 Text "24"][!SetOption MeterW5D1 Text "25"][!SetOption MeterW5D2 Text "26"][!SetOption MeterW5D3 Text "27"][!SetOption MeterW5D4 Text "28"][!SetOption MeterW5D5 Text "#Day29#"][!SetOption MeterW5D6 Text "#Day30#"][!SetOption MeterW5D7 Text "#Day31#"][!SetOption MeterW6D1 Text "#Day32#"][!SetOption MeterW6D2 Text "#Day33#"][!SetOption MeterW6D3 Text "#Day34#"][!SetOption MeterW6D4 Text "#Day35#"][!SetOption MeterW6D5 Text "#Day36#"][!SetOption MeterW6D6 Text "#Day37#"][!SetOption MeterW6D7 Text "#Day38#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition6=(#CURRENTSECTION#=6)
IfTrueAction6=[!SetOption MeterW1D1 Text "#Day-5#"][!SetOption MeterW1D2 Text "#Day-4#"][!SetOption MeterW1D3 Text "#Day-3#"][!SetOption MeterW1D4 Text "#Day-2#"][!SetOption MeterW1D5 Text "#Day-1#"][!SetOption MeterW1D6 Text "1"][!SetOption MeterW1D7 Text "2"][!SetOption MeterW2D1 Text "3"][!SetOption MeterW2D2 Text "4"][!SetOption MeterW2D3 Text "5"][!SetOption MeterW2D4 Text "6"][!SetOption MeterW2D5 Text "7"][!SetOption MeterW2D6 Text "8"][!SetOption MeterW2D7 Text "9"][!SetOption MeterW3D1 Text "10"][!SetOption MeterW3D2 Text "11"][!SetOption MeterW3D3 Text "12"][!SetOption MeterW3D4 Text "13"][!SetOption MeterW3D5 Text "14"][!SetOption MeterW3D6 Text "15"][!SetOption MeterW3D7 Text "16"][!SetOption MeterW4D1 Text "17"][!SetOption MeterW4D2 Text "18"][!SetOption MeterW4D3 Text "19"][!SetOption MeterW4D4 Text "20"][!SetOption MeterW4D5 Text "21"][!SetOption MeterW4D6 Text "22"][!SetOption MeterW4D7 Text "23"][!SetOption MeterW5D1 Text "24"][!SetOption MeterW5D2 Text "25"][!SetOption MeterW5D3 Text "26"][!SetOption MeterW5D4 Text "27"][!SetOption MeterW5D5 Text "28"][!SetOption MeterW5D6 Text "#Day29#"][!SetOption MeterW5D7 Text "#Day30#"][!SetOption MeterW6D1 Text "#Day31#"][!SetOption MeterW6D2 Text "#Day32#"][!SetOption MeterW6D3 Text "#Day33#"][!SetOption MeterW6D4 Text "#Day34#"][!SetOption MeterW6D5 Text "#Day35#"][!SetOption MeterW6D6 Text "#Day36#"][!SetOption MeterW6D7 Text "#Day37#"][!UpdateMeterGroup "Calendar"][!Redraw]
IfCondition7=(#CURRENTSECTION#=7)
IfTrueAction7=[!SetOption MeterW1D1 Text "#Day-6#"][!SetOption MeterW1D2 Text "#Day-5#"][!SetOption MeterW1D3 Text "#Day-4#"][!SetOption MeterW1D4 Text "#Day-3#"][!SetOption MeterW1D5 Text "#Day-2#"][!SetOption MeterW1D6 Text "#Day-1#"][!SetOption MeterW1D7 Text "1"][!SetOption MeterW2D1 Text "2"][!SetOption MeterW2D2 Text "3"][!SetOption MeterW2D3 Text "4"][!SetOption MeterW2D4 Text "5"][!SetOption MeterW2D5 Text "6"][!SetOption MeterW2D6 Text "7"][!SetOption MeterW2D7 Text "8"][!SetOption MeterW3D1 Text "9"][!SetOption MeterW3D2 Text "10"][!SetOption MeterW3D3 Text "11"][!SetOption MeterW3D4 Text "12"][!SetOption MeterW3D5 Text "13"][!SetOption MeterW3D6 Text "14"][!SetOption MeterW3D7 Text "15"][!SetOption MeterW4D1 Text "16"][!SetOption MeterW4D2 Text "17"][!SetOption MeterW4D3 Text "18"][!SetOption MeterW4D4 Text "19"][!SetOption MeterW4D5 Text "20"][!SetOption MeterW4D6 Text "21"][!SetOption MeterW4D7 Text "22"][!SetOption MeterW5D1 Text "23"][!SetOption MeterW5D2 Text "24"][!SetOption MeterW5D3 Text "25"][!SetOption MeterW5D4 Text "26"][!SetOption MeterW5D5 Text "27"][!SetOption MeterW5D6 Text "28"][!SetOption MeterW5D7 Text "#Day29#"][!SetOption MeterW6D1 Text "#Day30#"][!SetOption MeterW6D2 Text "#Day31#"][!SetOption MeterW6D3 Text "#Day32#"][!SetOption MeterW6D4 Text "#Day33#"][!SetOption MeterW6D5 Text "#Day34#"][!SetOption MeterW6D6 Text "#Day35#"][!SetOption MeterW6D7 Text "#Day36#"][!UpdateMeterGroup "Calendar"][!Redraw]
DynamicVariables=1

[MeterW1D1]
Meter=STRING
MeterStyle=DayStringStyle
X=28
Y=52

[MeterW1D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW1D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW2D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW2D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW3D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW3D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW4D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW4D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW5D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r
Text=30

[MeterW5D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW5D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D1]
Meter=STRING
MeterStyle=DayStringStyle
X=-126r
Y=17r

[MeterW6D2]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D3]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D4]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D5]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D6]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r

[MeterW6D7]
Meter=STRING
MeterStyle=DayStringStyle
X=21r
Y=0r
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

balala wrote: June 20th, 2020, 5:55 pm Alright. And how about this?
Nice, I'll see that when we will change month.

2 little things I'd like to add to this :
- having an orange rectangle on the current day, just behind the number.
- having a darker color for the days of prev and/or next month
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help: Switching wallpapers with a button

Post by balala »

Mino_el_Nukenin wrote: June 20th, 2020, 6:01 pm 2 little things I'd like to add to this :
- having an orange rectangle on the current day, just behind the number.
- having a darker color for the days of prev and/or next month
Alright, these are gonna be the next steps.
Mino_el_Nukenin
Posts: 231
Joined: April 24th, 2020, 7:39 pm
Location: France

Re: Help: Switching wallpapers with a button

Post by Mino_el_Nukenin »

balala wrote: June 20th, 2020, 6:04 pm Alright, these are gonna be the next steps.
Cool !
A question, there are parts of the code with ; at the beginning of teh line, doesn't that make what follow inactive and not working ?