It is currently April 23rd, 2024, 7:37 am

Need help - set variables bang not working as intended

Get help with creating, editing & fixing problems with skins
G-ben91
Posts: 2
Joined: September 13th, 2010, 11:31 am

Need help - set variables bang not working as intended

Post by G-ben91 »

Hi, I'm new here, just registered because this problem.

I wanted to make my time-table in rainmeter, it's supposed to show my current, today's schedule and the next day's. I did it with images, I have images named Mon, Tue, etc.

Code: Select all

[Rainmeter]
BackgroundMode=0
Background=órarend-alap.png

[Variables]
Day=


[Measureday]
Measure=Time
Format="%a"
IfEqualValue = Mon
IfEqualAction = !RainmeterSetVariable Day Tue
IfEqualValue = Tue
IfEqualAction = !RainmeterSetVariable Day Wed
IfEqualValue = Wed
IfEqualAction = !RainmeterSetVariable Day Thu
IfEqualValue = Thu
IfEqualAction = !RainmeterSetVariable Day Fri
IfEqualValue = Sun
IfEqualAction = !RainmeterSetVariable Day Mon


[MeterOrarend]
Meter=IMAGE
Measurename=Measureday
ImageName=%1


[MeterOrarendNext]
Meter=IMAGE
ImageName=#Day#
X=130
DynamicVariables=1
problem: at first the sun-->mon bang was first in line, and it worked on sunday. next (on monday) it didnt move on, unless I changed the order of the bangs and put the mon-->tue bang first in line. so how do i make them work wihtout messing with it every day?

I have rainmeter 1.2 rev 440 64bit, win7 64 bit....

(note: in my mothertongue órarend means time-table, if you might wonder...)
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Need help - set variables bang not working as intended

Post by Chewtoy »

You can't have multiple IfEqual statements in the same measure.
You will have to split them up. So you got one measure for sunday, one for monday, one for tuesday and so on.
I don't think, therefore I'm not.
G-ben91
Posts: 2
Joined: September 13th, 2010, 11:31 am

Re: Need help - set variables bang not working as intended

Post by G-ben91 »

Ah, thx :D
maybe... is it possible to make it shorter? like make a calc measure or something...


Edit: I got it. Damn I over-complicated things. I didnt realize there's a "%w" format for time -.-
Last edited by G-ben91 on September 13th, 2010, 7:25 pm, edited 1 time in total.
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Need help - set variables bang not working as intended

Post by Chewtoy »

Code: Select all

[Measureday]
Measure=Time
Format="%w"

[Calc1]
Measure=Calc
Formula=MeasureDay = 0 ? Sun : (MeasureDay = 1 ? Mon : (MeasureDay = 2 ? Tue  : (MeasureDay = 3 ? Wed  : (MeasureDay = 4 ? Thu : (MeasureDay = 5 ? Fri : Sat)))))

[Set]
Measure=Calc
Formula=Counter %600
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterSetVariable Day "[Calc1]"]
Something like that perhaps...
Counter is really just there to update the value every 600th update cycle.. Change it like you want.
I don't think, therefore I'm not.