Display an object or text at a specific time!

Hello, everyone,
who can help me?
The following…
I want to display an object (sharp lawer) or text at a specific time!
For example, from 3:00 p.m. to 3:59 p.m. and/or from 4:00 a.m. to 4:59 a.m. in yellow and outside these times in white.
(I probably need to create 2 objects, one in white and one in yellow)
This formula only shows only the full hour: $#Dm#==0?100:0$

Please help me… thanks in advance…

1 Like

Your easiest way is to use two layers like you have mentioned. Put the white one on the bottom with 100% opacity. Take the yellow top layer and use $#DH#==4||#DH#==15?100:0$ in the opacity box and it should work just like you want. The expression is written in 24-hour time (0-23) so if you want to change the times just remember to add 12 to the afternoon 12-hour time so it will work correctly.

6 Likes

@mrantisocialguy , if I didn’t have you…
Thanks so much.

3 Likes

Hello everyone,
I would like the moon phase object to be displayed automatically in the time of sunset ( #WSHZ#:#WSmZ#) and sunrise (#WRHZ#:#WRmZ#).

With this formula ($#DH#==4||#DH#==15?100:0$) I would have to change it manually all the time…

Anyone have any ideas or tips???
Thanks in advance…

1 Like

Sorry, I have to ask to make clear what time(s) you actually want that component to be visible. Only for one minute on sunset and one minute on sunrise, or during the whole time while the sun is down?

2 Likes

Please excuse me for not expressing it correctly.
It is supposed to display the phases of the moon constantly from sunset to sunrise!
eg:
18:34 (sunset) to 6:34 (sunrise) = always visible
6:34 (sunrise) to 18:34 (sunset) = Not visible.

1 Like

I think you want to look at #DISDAYTIME#

This works in the Opacity box .

There are other ways to do it .Keep it simple .

((#DISDAYTIME#)*100)

1 Like

Since the opacity of moophase element cant be adjusted, you can shift it out of the screen during the day with formula like this in the X coordinate field:
$(#WRH#*60+#WRm#)<(#DH#*60+#Dm#)&&(#DH#*60+#Dm#)<(#WSH#*60+#WSm#)?1000:160$

To enhance your confusion, you may want to look at this topic.

2 Likes

Since the moon and weather have no adjustable visibility, I took a detour here.

The moon slowly dims with the sunrise.
There is an image above it, in which the visibility is controlled.
The code for this:
((clamp(30-#WSUNRISEH#*60-#WSUNRISEM#+#DH#*60+#Dm#,0,60)-clamp(30-#WSH#*60-#WSM#+#DH#*60 +#Dm#,0,60))*70/60)

With the weather, it switches hard from day to night.
There it is controlled by the size.
The code for this:
Night: $#DISDAYTIME#=true? 0:320$
Day: $#DISDAYTIME#=true? 320:0$

All codes here come from the community and were only adapted by me.

Small note …
I’ve noticed that this preview, as can be seen here, often displays “disdaytime” incorrectly.
This works flawlessly in the creator and on the watch.

2 Likes

Thank you very much for your help.
I’ve finally come a long way.
Here is the result… but I still have to test it on my watch

1 Like

This all seems to be working fine. :+1:

2 Likes