It is currently June 23rd, 2024, 11:35 pm

Help with Refreshing Time Related Greeting

Get help with installing and using Rainmeter.
benramsden99
Posts: 3
Joined: June 21st, 2017, 6:51 pm

Help with Refreshing Time Related Greeting

Post by benramsden99 »

So I have cobbled together a skin which mostly works. However, I have added a time related greeting e.g. 'Good morning, "NAME"', it works when I manually refresh the skin, but when it gets to 12:00, 18:00 or 20:00 hours when I have set it to change from 'Good afternoon' to 'Good evening', it doesn't change itself, I have to manually refresh the skin.

This is how it currently looks:
rain 1.GIF
This is how I want it to look:
rain2.GIF
Any help appreciated :D

Code: Select all

[Rainmeter]
;Blur=1
Update=1000

[Variables]
@include=#ROOTCONFIGPATH#@Recources\Variables\Options.inc

;______________________________;
;-------General_Measures-------;

[Measure_cpu]
measure=CPU
Processor=0

[Measure_ram]
Measure=PhysicalMemory

[Measure_time]
Measure=Time
Format=%#I:%M:%S %p

[Measure_date]
Measure=Time
Format=%A, %B %#d

[msTime]
Measure=Time
Format=%H
Substitute="00":"Good morning","01":"Good morning","02":"Good morning","03":"Good morning","04":"Good morning","05":"Good morning","06":"Good morning","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 night","21":"Good night","22":"Good night","23":"Good night"

[Measure_GPU_Load]
Measure=Plugin
Plugin=MSIAfterburner.dll
DataSource=GPU usage
MaxValue=100
MinValue=0

;_____________________________;
;-------General_Meters--------;

[Meter_Greeting]
MeasureName=msTime
Meter=String
StringStyle=Left
FontFace=#font#
FontColor=#textcolor2#
FontSize=#textsize2#
X=-7
Y=10
AntiAlias=1
Text=[msTime], Ben

[Meter_Text_cpu]
Meter=String
MeasureName=Measure_cpu
StringStyle=Left
FontFace=#font2#
FontColor=#textcolor1#
FontSize=#textsize1#
X=0
Y=105
AntiAlias=1
Text="Your current CPU usage is: %1%"

[Meter_Text_ram]
Meter=String
MeasureName=Measure_ram
StringStyle=Left
FontFace=#font2#
FontColor=#textcolor1#
FontSize=#textsize1#
X=0
Y=135
AntiAlias=1
Text="Your current RAM usage is: %1mb"
Scale=1000000

[Meter_Text_gpu]
Meter=String
MeasureName=Measure_GPU_Load
StringStyle=Left
FontFace=#font2#
FontColor=#textcolor1#
FontSize=#textsize1#
X=0
Y=165
AntiAlias=1
Text="Your current GPU usage is: %1%"

[Meter_Text_Time]
Meter=String
MeasureName=Measure_time
StringStyle=Left
FontFace=#font2#
FontColor=#textcolor1#
FontSize=#textsize1#
X=0
Y=75
AntiAlias=1
Text="The current time is %1"

[Meter_Text_Date]
Meter=String
MeasureName=Measure_date
StringStyle=Left
FontFace=#font2#
FontColor=#textcolor1#
FontSize=#textsize1#
X=370r
Y=75
AntiAlias=1
Text="on %1"
You do not have the required permissions to view the files attached to this post.
Last edited by benramsden99 on June 21st, 2017, 7:16 pm, edited 2 times in total.
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with Refreshing Time Related Greeting

Post by jsmorley »

Just add:

DynamicVariables=1

to [Meter_Greeting].
benramsden99
Posts: 3
Joined: June 21st, 2017, 6:51 pm

Re: Help with Refreshing Time Related Greeting

Post by benramsden99 »

Many thanks, I'll give it a try :)
benramsden99
Posts: 3
Joined: June 21st, 2017, 6:51 pm

Re: Help with Refreshing Time Related Greeting

Post by benramsden99 »

jsmorley wrote:Just add:

DynamicVariables=1

to [Meter_Greeting].
Works amazingly, many thanks :D
Naren
Posts: 1
Joined: January 18th, 2023, 8:53 am

Re: Help with Refreshing Time Related Greeting

Post by Naren »

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh] 
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\Language.inc
Scale=0.45
ImageName=#@#Night.png


;-------------------------------------------------------------
;-------------------------------------------------------------

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

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureConvertNum]
Measure=Calc
Formula=MeasureTime
IfCondition=(MeasureConvertNum >= 00) && (MeasureConvertNum < 06)
IfTrueAction=[!SetVariable ImageName "#@#Night.png"]
IfCondition2=(MeasureConvertNum >= 06) && (MeasureConvertNum < 12)
IfTrueAction2=[!SetVariable ImageName "#@#Morning.png"]
IfCondition3=(MeasureConvertNum >= 12) && (MeasureConvertNum < 18)
IfTrueAction3=[!SetVariable ImageName "#@#Afternoon.png"]
IfCondition4=(MeasureConvertNum >= 18) && (MeasureConvertNum < 21)
IfTrueAction4=[!SetVariable ImageName "#@#Evening.png"]
IfCondition5=(MeasureConvertNum >= 21)
IfTrueAction5=[!SetVariable ImageName "#@#Night.png"]
OnUpdateAction=[!UpdateMeter MeterImage][!Redraw]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterImage]
Meter=Image
ImageName=#ImageName#
X=(0*#Scale#)
Y=(0*#Scale#)
W=(150*#Scale#)
AntiAlias=1
DynamicVariables=1
UpdateDivider=-1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterText]
Meter=String
MeasureName=MeasureTime
StringAlign=Left
StringCase=Upper
FontColor=#Color1#
FontFace=Montserrat Light
FontSize=(20*#Scale#)
X=(0*#Scale#)
Y=(120*#Scale#)r
Text="%1"
AntiAlias=1
for this code, I want to add my name after the greeting like good afternoon Naren
Last edited by balala on January 18th, 2023, 1:14 pm, edited 1 time in total.
User avatar
xenium
Posts: 872
Joined: January 4th, 2018, 9:52 pm

Re: Help with Refreshing Time Related Greeting

Post by xenium »

Naren wrote: January 18th, 2023, 9:16 am

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh] 
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.2 ? 0.2 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\Language.inc
Scale=0.45
ImageName=#@#Night.png


;-------------------------------------------------------------
;-------------------------------------------------------------

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

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureConvertNum]
Measure=Calc
Formula=MeasureTime
IfCondition=(MeasureConvertNum >= 00) && (MeasureConvertNum < 06)
IfTrueAction=[!SetVariable ImageName "#@#Night.png"]
IfCondition2=(MeasureConvertNum >= 06) && (MeasureConvertNum < 12)
IfTrueAction2=[!SetVariable ImageName "#@#Morning.png"]
IfCondition3=(MeasureConvertNum >= 12) && (MeasureConvertNum < 18)
IfTrueAction3=[!SetVariable ImageName "#@#Afternoon.png"]
IfCondition4=(MeasureConvertNum >= 18) && (MeasureConvertNum < 21)
IfTrueAction4=[!SetVariable ImageName "#@#Evening.png"]
IfCondition5=(MeasureConvertNum >= 21)
IfTrueAction5=[!SetVariable ImageName "#@#Night.png"]
OnUpdateAction=[!UpdateMeter MeterImage][!Redraw]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterImage]
Meter=Image
ImageName=#ImageName#
X=(0*#Scale#)
Y=(0*#Scale#)
W=(150*#Scale#)
AntiAlias=1
DynamicVariables=1
UpdateDivider=-1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterText]
Meter=String
MeasureName=MeasureTime
StringAlign=Left
StringCase=Upper
FontColor=#Color1#
FontFace=Montserrat Light
FontSize=(20*#Scale#)
X=(0*#Scale#)
Y=(120*#Scale#)r
Text="%1"
AntiAlias=1


for this code, I want to add my name after the greeting like good afternoon Naren
At [MeterText], edit:
Text =%1, Naren