# Change text based on the time

In the new topic, I wrote a text, for example, “good morning”, but I would like to adjust the text so that it changes by itself during the day to, for example, “good afternoon”, etc., and is repeated every day. Can someone tell me how is this possible to?

That should be fairly straightforward. Try this in your text box:

\$if(df(hh)<12,“Good Morning”,“Good Afternoon”)\$

It just checks the time of day in hours and if it’s before noon prints Good Morning, and it’s it’s after 12 noon prints Good Afternoon. It should work regardless of whether you use 24 hour clock or AM/PM.

1 Like

Tried it, it works! Ok, thank you very much!

You can go further too, with more granular times

Good \$if(df(hh)>22,Night, df(hh)>16,Evening, df(hh)>12,Afternoon, df(hh)>5,Morning, Night)\$

1 Like

Yes, good, thank you! I understand that the numbers 22, 16… in this formula indicate exactly the time of the text change. Got it.Can you also tell me how to add several pictures (3-5) to the topic? So that they also change, for example, after 8 hours

If you insert an image box and convert the Select Image to Formula, you can then examine the choices in tu (timer utilities) which includes the option:

\$tu(rndimg, 15, “/sdcard/pictures”)\$

which will load a random image from a folder with 15 second intervals. I think I remember it’s limited to jpegs but I may be wrong.

You could also load specific images at specific times using a formula similar to the Good Morning one.

1 Like

OK, I’ll try. I don’t really know anything yet, I’m learning on my own, using tips, like yours, and experiments. I want to learn how to create good topics. Thank you for the advice.

Trial and error (after error after error) is pretty much the only way to learn. I’m still learning every day. Just pick a project you want and make mistakes until you get it.

1 Like

Probably so. This is a screenshot of one of the 5 themes that I started to create… the font, icons still need to be adjusted, the color as well, but I have already learned a little.In addition to this picture, there are 4 more in the same style, that is why I was interested in changing the pictures. I want to create another player. I will try.

Nice! Is that your artwork? Looks like a woman in an evening gown from the back, to me at least.

…This is a set of pictures for this topic.

This topic was automatically closed 25 days after the last reply. New replies are no longer allowed.