It is currently December 9th, 2021, 4:09 am

Problem with clock/text sync

Help with creating, editing & fixing problems with skins
User avatar
Alloutofmercy
Posts: 32
Joined: November 17th, 2021, 5:51 am

Problem with clock/text sync

Post by Alloutofmercy »

Another problem...

Code: Select all


[MeasureTimeOfDay]
Measure=Time
Format="%H"
Substitute=#TimeOfDay#

[Threatenmessage]
Meter=String
MeasureName=MeasureTimeOfDay
StringAlign=Left
StringCase=Upper
FontSize=50
FontFace=Segoe UI
FontColor=#red#
Text="%1"
AntiAlias=1
X=120
Y=36
So I want this text

Code: Select all

TimeOfDay="00":"Good Night","01":"Good Night","02":"Good Night","03":"Good Night","04":"Good Night","05":"Good Night","06":"Good Night","07":"Good Morning","08":"Good Morning","09":"Good Morning","10":"Good Morning","11":"Good Morning","12":"Good Afternoon","13":"Good Afternoon","14":"Good Afternoon","15":"Good Afternoon","16":"Good Afternoon","17":"Good Afternoon","18":"Good Evening","19":"Good Evening","20":"Good Evening","21":"Good Evening","22":"Good Evening","23":"Good Evening"

To appear according to the time. Like Good morinin for 9 and all. The problem is that it is only showing only showing the time not the text even though I have included the variable file in the variables section

Code: Select all

@include=variables.inc
User avatar
death.crafter
Rainmeter Sage
Posts: 1208
Joined: April 24th, 2021, 8:13 pm

Re: Problem with clock/text sync

Post by death.crafter »

Alloutofmercy wrote: November 18th, 2021, 7:08 am Another problem...

Code: Select all

[Variables]
Greeting=

[Hour]
Measure=Time
Format=%H
IfCondition=(Hour >= 0) && (Hour <8)
IfTrueAction=[!SetVariable Greeting "Good night, Example!"][!UpdateMeter Greeting][!Redraw]
IfCondition2=(Hour >= 8) && (Hour < 12)
IfTrueAction2=[!SetVariable Greeting "Good morning, Example!"][!UpdateMeter Greeting][!Redraw]
IfCondition3=(Hour >= 12) && (Hour < 18)
IfTrueAction3=[!SetVariable Greeting "Good afternoon, Example!"][!UpdateMeter Greeting][!Redraw]
IfCondition4=(Hour >= 18) && (Hour <= 23)
IfTrueAction4=[!SetVariable Greeting "Good evening, Example!"][!UpdateMeter Greeting][!Redraw]

[Greeting]
Meter=String
Text=#Greeting#
DynamicVariables=1
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problem with clock/text sync

Post by balala »

Alloutofmercy wrote: November 18th, 2021, 7:08 am To appear according to the time. Like Good morinin for 9 and all. The problem is that it is only showing only showing the time not the text even though I have included the variable file in the variables section
Besides death.crafter's solution on using IfConditions, I think the [Variables] section name is missing in front of the posted TimeOfDay variable, into the included variables.inc file. You have to have this section name over there as well. If this is correct, add it:

Code: Select all

[Variables]
...
TimeOfDay="00":"Good Night","01":"Good Night","02":"Good Night","03":"Good Night","04":"Good Night","05":"Good Night","06":"Good Night","07":"Good Morning","08":"Good Morning","09":"Good Morning","10":"Good Morning","11":"Good Morning","12":"Good Afternoon","13":"Good Afternoon","14":"Good Afternoon","15":"Good Afternoon","16":"Good Afternoon","17":"Good Afternoon","18":"Good Evening","19":"Good Evening","20":"Good Evening","21":"Good Evening","22":"Good Evening","23":"Good Evening"
If this doesn't fix the issue, check the location of the variables.inc file, which has to be near the skins .ini file (not for instance in the @Resources folder).
If none of these is fixing, please pack the whole config and upload the package (the code of skin is not enough), to can check.
User avatar
Alloutofmercy
Posts: 32
Joined: November 17th, 2021, 5:51 am

Re: Problem with clock/text sync

Post by Alloutofmercy »

This worked like a charm. Thankyou
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problem with clock/text sync

Post by balala »

Alloutofmercy wrote: November 18th, 2021, 2:47 pm This worked like a charm.
What exactly worked? Did you have to add the missing [Variables] section name, or the file has been placed on a wrong location?
User avatar
Alloutofmercy
Posts: 32
Joined: November 17th, 2021, 5:51 am

Re: Problem with clock/text sync

Post by Alloutofmercy »

yes, I had to add the variable file.
User avatar
balala
Rainmeter Sage
Posts: 13533
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problem with clock/text sync

Post by balala »

Alloutofmercy wrote: November 18th, 2021, 5:50 pm yes, I had to add the variable file.
Alright, good you got it working.