It is currently March 29th, 2024, 12:10 pm

So once again i need help

Get help with creating, editing & fixing problems with skins
aredhone
Posts: 38
Joined: November 12th, 2017, 6:03 pm

So once again i need help

Post by aredhone »

so last time i askt help with the time meter thingy i thought i understud it but im stuck again

why is this not working

Code: Select all

[MeasureDay]
Measure=Time
Format=%w

;Clean
[MeasureOddEvenDay]
Measure=Calc
Formula=MeasureDay%2
Substitute="1":"Free","2":"Free","3":"Both","4":"Free","5":"Free","6":"Free"

[Task]
Meter=String
MeasureName=MeasureDay
MeasureName2=MeasureOddEvenDay
MeterStyle=TaskStyle
X=-5r
Y=94r
Text="%2"
Last edited by aredhone on October 21st, 2020, 10:28 am, edited 1 time in total.
aredhone
Posts: 38
Joined: November 12th, 2017, 6:03 pm

Re: So once again i need help

Post by aredhone »

o i forget to mention
i need it to say clean only on Wednesday
and all other days it should say Free

So for any one who wants to know i think i got it
but a seccond opinion would be great

Code: Select all

;Clean
[MeasureDay]
Measure=Time
Format=%w
Substitute="1":"Free","2":"Free","3":"Both","4":"Free","5":"Free","6":"Free"

[Task]
Meter=String
MeasureName=MeasureDay
MeasureName2=MeasureOddEvenDay
MeterStyle=TaskStyle
X=-5r
Y=94r
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: So once again i need help

Post by balala »

EDIT: Just saw your second post after I posted my reply. It's alright, however the substitution of 0 is still missing. Add it as I wrote below.
aredhone wrote: October 21st, 2020, 9:52 am so last time i askt help with the time meter thingy i thought i understud it but im stuck again

why is this not working
It is working, just that the [MeasureOddEvenDay] measure can return only two values: 0 or 1. According to the substitution option, 1 is replaced by "Free", but 0 is not replaced by anything, so it is shown so. This means that on Sunday (when MeasureOddEvenDay is 0), Tuesday (MeasureOddEvenDay=2), Thursday (MeasureOddEvenDay=4) or Saturday (MeasureOddEvenDay=6), the measure returns 0 (and this is not substituted), while on Monday (MeasureOddEvenDay=1), Wednesday (MeasureOddEvenDay=3) or Friday (MeasureOddEvenDay=5), the value of the [MeasureOddEvenDay] measure is 1, which is substituted by Free. You never get Both (or Clean - not sure what finally do you want to get).
If you don't need the value reurned by the [MeasureDay] measure anywhere else, you can add the rewritten Substitute option directly to this measure, in the following form: Substitute="0":"Free","1":"Free","2":"Free","3":"Both","4":"Free","5":"Free","6":"Free"
. Note that I added the substitution of the 0 as well.
If you need the [MeasureDay] measure somewhere else as well, rewrite the Formula and Substitute options of the [MeasureOddEvenDay] measure, this way:

Code: Select all

[MeasureOddEvenDay]
...
Formula=MeasureDay
Substitute="0":"Free","1":"Free","2":"Free","3":"Both","4":"Free","5":"Free","6":"Free"
Note that the used Formula=MeasureDay%2 formula is returning the reminder (modulus) of the divison of MeasureDay measure by 2. This can be either 0 or 1. This is not a good approach if you wanna get some result only on Wednesday and another on all other days.
aredhone
Posts: 38
Joined: November 12th, 2017, 6:03 pm

Re: So once again i need help

Post by aredhone »

o That explains alot
i got it to work in the end and i came to the same conclusion
once i decided to read some topics on here
but thanks alot once again
i think im starting to learn here xD
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: So once again i need help

Post by balala »

aredhone wrote: October 25th, 2020, 11:16 am i think im starting to learn here xD
Yep, this is the idea behind this forum. I'm glad you got it working well. :thumbup: