Hello everyone,
I'm new to Rainmeter, but I've recently completed the tutorials found on the Rainmeter 101 page.
Now I'm ready to start my first project, and I've chosen a typographic clock. I've successfully made all of the meters needed to physically display the clock, and I understand the basics of hiding/showing/redrawing meters (I think) from the part of the rss tutorial that involved highlighting things.
The problem I'm having is how to trigger the execute bang to show and hide different words based on the time of day. It's not a mouseover action like in the tutorial. Are there other event listeners? Where can I find them? Which do you suggest I use? Where should I place said suggestion?
Thanks in advance for any help that you can provide.
It is currently May 17th, 2024, 5:39 am
Hiding/showing Meters based on time of day.
-
- Posts: 9
- Joined: August 2nd, 2010, 5:25 am
-
- Posts: 667
- Joined: April 18th, 2010, 2:16 pm
- Location: NY, USA
Re: Hiding/showing Meters based on time of day.
Use a Time measure in conjunction with !bangs
[measureTime]
Measure=Time
Format=%H
IfBelowValue=12
IfBelowAction=!Execute [!RainmeterShowMeter meter1][!RainmeterHideMeter meter2]
IfAboveValue=12
IfAboveAction=!Execute [!RainmeterShowMeter meter2][!RainmeterHideMeter meter1]
This is very simple, but should work.
You can use any format you want, but don't add any : or extra characters.
Make sure if you do use another format you have an appropiate number for IfStatements.
You can run [measureTime] through a calc to have more options using conditions. (http://rainmeter.net/cms/Measures-Calc_13)
[measureTime]
Measure=Time
Format=%H
IfBelowValue=12
IfBelowAction=!Execute [!RainmeterShowMeter meter1][!RainmeterHideMeter meter2]
IfAboveValue=12
IfAboveAction=!Execute [!RainmeterShowMeter meter2][!RainmeterHideMeter meter1]
This is very simple, but should work.
You can use any format you want, but don't add any : or extra characters.
Make sure if you do use another format you have an appropiate number for IfStatements.
You can run [measureTime] through a calc to have more options using conditions. (http://rainmeter.net/cms/Measures-Calc_13)
-
- Posts: 9
- Joined: August 2nd, 2010, 5:25 am
Re: Hiding/showing Meters based on time of day.
Thank you, I will try this and get back to you.
-
- Posts: 9
- Joined: August 2nd, 2010, 5:25 am
Re: Hiding/showing Meters based on time of day.
Okay, still working on the clock. What was posted above really helped with the AM/PM part, which is working and giving me hope as proof of concept. The next thing I'm tackling is getting the clock to say something to the extent of 'IT IS FIVE TO ONE' or 'IT IS FIVE PAST TWELVE'. To do this, I believe I'll need to use a conditional calculation, but I'm not certain if my syntax is correct. Could someone please proof read this for me? The documentation is somewhat confusing, at least to me.
In that code, #sFIVE1# and #hFIVE1# are variables that contain a series of bangs that show or hide the letters F-I-V-E on the clock face.
Again, I really appreciate all of the help the people on this forum are willing to provide. Thank you.
Code: Select all
[MeasureMinute]
Measure=Time
TimeZone=-5.0
Format=%M
[MeasureFive]
Measure=Calc
Formula=[MeasureMinute]<=07||[MeasureMinute]>=53 ? !Execute #sFIVE1# : !Execute #hFIVE1#
DynamicVariables=1
Again, I really appreciate all of the help the people on this forum are willing to provide. Thank you.
-
- Rainmeter Sage
- Posts: 642
- Joined: July 19th, 2009, 5:59 am
- Location: Montreal, QC, Canada
Re: Hiding/showing Meters based on time of day.
A conditional statement returns a value, it doesn't perform any actions. Instead, try this:
Code: Select all
[MeasureFive]
Measure=Calc
Formula=([MeasureMinute]<=07) || ([MeasureMinute]>=53) ? 1 : 2
IfEqualValue=1
IfEqualAction=!Execute #sFIVE1#
IfAboveValue=1
IfAboveAction=!Execute #hFIVE1#
DynamicVariables=1
-
- Posts: 9
- Joined: August 2nd, 2010, 5:25 am
Re: Hiding/showing Meters based on time of day.
Hey, thanks for all your help. I finished the clock, and it turned out pretty cool. It works, but because the code is so long, I got the impression that perhaps it's not very efficient. The code is attached. Do you have any suggestions for streamlining it?
You're also welcome to keep the clock, but please don't redistribute it. It's accurate to within five minutes.
You're also welcome to keep the clock, but please don't redistribute it. It's accurate to within five minutes.
-
- Posts: 667
- Joined: April 18th, 2010, 2:16 pm
- Location: NY, USA
Re: Hiding/showing Meters based on time of day.
Attached where...?
And lengthyness is (most generally) not an issue.
As long as it functions as you want it to it should be fine.
And lengthyness is (most generally) not an issue.
As long as it functions as you want it to it should be fine.
-
- Posts: 9
- Joined: August 2nd, 2010, 5:25 am
Re: Hiding/showing Meters based on time of day.
Whoops, I dunno why that didn't work the first time. Anyway, there you go.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9
- Joined: August 2nd, 2010, 5:25 am
Re: Hiding/showing Meters based on time of day.
There also seems to be some sort of problem with the code for the hours around 9/10.
Edit: make that 8/9.
Edit: make that 8/9.