Alright, here it is. Firstly note that the
Format=%#I:%M:%S time format in my opiniony at least doesn't make too much sense, a
%p parameter would also be required I believe:
Format=%#I:%M:%S %p. This parameter is adding the AM / PM to the time, which in case of using a 12 hours time measurement is needed, otherwise you can't make the difference between AM and PM.
Now as said, a Time measure has a string value (according to its Format option) and a numeric value, which can be accessed with the :TimeStamp parameter. Using the numeric format is much easier always because the comparasions are made much more easily. However if you're using an
AlarmTime=12:00:00 pm variable for instance, you have to get the associated time stamp, which can be done with a newly added Time measure (the [MeasureAlarmTime] measure in the below code). But there is one more problem: you have to use the date besides the time as well, so I added a new Time measure ([MeasureDate]) which is returning the date and used its string value in the TimeStamp option of the [MeasureAlarmTime] measure (to get the time for the current day).
The updated code:
Code: Select all
[Rainmeter]
Update=1000
[Variables]
AlarmTime=""
[MeasureDate]
Measure=Time
Format=%Y.%m.%d
[MeasureAlarm]
Measure=Time
Format=%#I:%M:%S %p
IfCondition=([MeasureAlarm:TimeStamp]=[MeasureAlarmTime:TimeStamp])
IfTrueAction=[Play "#@#Sounds\bb.wav"]
DynamicVariables=1
[MeasureAlarmTime]
Measure=Time
TimeStamp=#AlarmTime# [MeasureDate]
TimeStampFormat=%#I:%M:%S %p %Y.%m.%d
DynamicVariables=1
[MeterSet]
Meter=String
FontSize=12
FontColor=204,255,196,255
StringStyle=Bold
SolidColor=47,47,47,255
Padding=5,6,5,5
AntiAlias=1
Text=Add
LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"]
[MeterInputLabel]
Meter=String
X=52
Y=0r
W=170
H=18
FontSize=12
FontColor=170,170,170,255
SolidColor=27,27,27,255
Padding=5,6,5,4
StringStyle=Italic
AntiAlias=1
Text=#AlarmTime#
DynamicVariables=1
[MeasureInput]
Measure=Plugin
Plugin=InputText
X=57
Y=4
W=171
H=20
FontSize=12
FontColor=255,255,255,255
SolidColor=47,47,47,255
AntiAlias=1
FocusDismiss=1
DefaultValue=#AlarmTime#
OnDismissAction=[!SetVariable CurrentInput ""][Play "#@#Sounds\Dismiss.wav"]
Command1=[!SetVariable AlarmTime "$UserInput$"][!UpdateMeter *][!Redraw]
See that I replaced the IfEqualValue / IfEqualAction option pair of the original code with an IfCondition. This is a newer and much more powerful option and using it, I could verify the :TimeStamp parameter into the section variables.
Unfortunately I suppose the above code is quite complicated for a beginner. Give it a few tries to see how does it work. If any question arises, feel free to ask.