It is currently May 21st, 2024, 11:27 pm

[Solved]Alarm for a specific time and date?

Get help with creating, editing & fixing problems with skins
User avatar
wiedzmawiedzma
Posts: 112
Joined: August 18th, 2012, 5:19 pm

Re: Alarm for a specific time and date?

Post by wiedzmawiedzma »

I have applied this approach and tested it in many ways.
It seems to be working!
I respond to the format = "% H% M% Y% m% d"
The solution is very easy:

Code: Select all

[MeasureTime] 
Measure=Time
Format="%H%M%Y%m%d"


[MeasureExecuteAlarm] 
Measure=Calc
Formula=(MeasureTime = #Hours##Minutes##Year##Month##Day#) ? 1 : 0
IfEqualValue=1
IfEqualAction=!Execute [PLAYLOOP #ALARMSOUND#][!EnableMeasure ImageNumberCalc][!ShowMeter ImageMeter][!HideMeter IconAlarm][!ShowMeter DistAlarm]
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Alarm for a specific time and date?

Post by Kaelri »

Heh, I was actually about to edit my post to add that solution. You don't need the conditional, by the way; you can just use:

Code: Select all

Formula=(MeasureTime = #Hours##Minutes##Year##Month##Day#)
User avatar
wiedzmawiedzma
Posts: 112
Joined: August 18th, 2012, 5:19 pm

Re: Alarm for a specific time and date?

Post by wiedzmawiedzma »

Thanks for your help!
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Alarm for a specific time and date?

Post by MerlinTheRed »

Kaelri wrote:There does indeed seem to be a bug related to large numbers. The IfValue only recognizes number values up to 2,147,483,648 (2^31); it will treat anything larger than this as equal. The "numbers" that you are trying to compare, such as "201209052200", are quite a bit bigger. So your approach cannot be used for now.
Damn. I need to eat a show now...
Kaelri wrote: What wiedzmawiedzma did is actually legitimate for the InputText plugin. This is explained in the manual, although not very clearly, I admit.
It may be allowed in Command statements, but certainly not in the middle of a !WriteKeyValue Bang, before the argument list is finished?
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Alarm for a specific time and date?

Post by Kaelri »

MerlinTheRed wrote:It may be allowed in Command statements, but certainly not in the middle of a !WriteKeyValue Bang, before the argument list is finished?
Whoops, my mistake. I was tricked by the line breaks.
User avatar
wiedzmawiedzma
Posts: 112
Joined: August 18th, 2012, 5:19 pm

Re: [Solved]Alarm for a specific time and date?

Post by wiedzmawiedzma »

Speak English poorly and really the more examples in the form of a code: it is better for people like me! It helps to understand the functioning of many solutions!
My solution works fine, but if it is bad
Please correct solutions such as code: :welcome: