; Birthday reminder SplitPath A_ScriptFullPath, null, DataDir, null, DataFile, null DataFile = %DataDir%\%DataFile%.dat TipSecs = 5 TipIcon = 1 ; %A_DDDD%, %A_DD%. %A_MMMM% %A_YYYY% (%A_DD%.%A_MM%.%A_YYYY%) FormatTime TodayS, , dd.MM. ShowMsg = 0 Loop read, %DataFile% { SplitFirst(CurDate, CurText, A_LoopReadLine, " ") Loop 6 { Advance := A_Index - 1 CheckDate = %A_Now% CheckDate += %Advance%, days FormatTime CheckDateS, %CheckDate%, dd.MM. If (CurDate = CheckDateS) { If (StrLen(TipText) > 0) TipText = %TipText%`n If (CurDate = TodayS) { CheckDateS = HEUTE: TipIcon = 2 ShowMsg = 1 } TipText = %TipText%%CheckDateS% %CurText% } } } TrayTip Kommende Geburtstage (%TodayS%%A_YYYY%), %TipText%, %TipSecs%, %TipIcon% If (ShowMsg = 1) MsgBox 4160, Geburtstage (%TodayS%%A_YYYY%), %TipText% SleepSecs := TipSecs * 1000 Sleep SleepSecs Exit SplitFirst(ByRef OutLeft, ByRef OutRight, InpText, InpSep) { StringGetPos SepPos, InpText, %InpSep% If (SepPos >= 0) { StringLeft OutLeft, InpText, %SepPos% RemChars := StrLen(InpText)-SepPos-1 StringRight OutRight, InpText, %RemChars% } Else { OutLeft := InpText OutRight := "" } }
Save this as sched.ahk. The following should be then saved as sched.dat (same basename as script!).
02.01. John Doe 11.06. Jane Doe 24.12. Christmas eve
Have fun.
Cheers,
-mARKUS