ClaymoreRoomba wrote: ↑March 21st, 2024, 5:18 pm
Thank you, I have changed the lines from IfTrueCondition to IfTrueAction; however, there still seems to be an issue, as the layouts don't seem to be swapping from day to evening. Even swapping to firewatchEvening manually just instantly reloads the firewatchDay layout. I therefore believe there must be a logic error in the firewatch-evening skin that somehow always returns true, however I cannot for the life of me understand what it is. Any extra help is much appreciated!
Well, there is a syntax particularity, in that the comparisons on either side of logical AND && and OR || operators must be enclosed between round brackets (like below), but that shouldn't interfere too much with the system, especially when switching from a layout to another manually...
firewatchDay.ini:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[mHour]
Measure=Time
Format=%H
UpdateDivider=10
IfCondition=(mHour >= 18) || (mHour < 6)
IfTrueAction=[!LoadLayout "firewatchEvening"]
[Background]
Meter=Image
ImageName=firewatch-day.jpg
W=1920
H=1050
LeftMouseUpAction=[!LoadLayout "firewatchEvening"]
firewatchEvening.ini:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[mHour]
Measure=Time
Format=%H
UpdateDivider=10
IfCondition=(mHour >= 6) && (mHour < 18)
IfTrueAction=[!LoadLayout "firewatchDay"]
[Background]
Meter=Image
ImageName=firewatch-evening.jpg
W=1920
H=1050
LeftMouseUpAction=[!LoadLayout "firewatchDay"]
The above works fine for me (I've changed the resolution based on the size of my laptop screen, feel free to adjust it back). It's true that at one point I had a similar issue to yours, but it was because I didn't properly save the layouts. To be more specific, the code in the skins is such that it will switch to the corresponding layout based on time, so you must make sure that the layout you save is the one for the desired part of day (i.e. that what you save is not the effect of the switching). To do that easier, I recommend commenting out (precede the lines with a
; symbol) the two IfCondition lines in each skin and refresh them before saving the layouts, so that the automatic switch doesn't cause you to save a layout with the "wrong" skin being active. Afterwards, you can uncomment those parts easily, by removing the
; at the start of the said lines.