Kalender mit Notizfunktion

  • Ein kleiner Kalender-Script mit einer Erinnerungs-Funktion der bei jedem Windows-Start geöffnet wird ^^

    Spoiler anzeigen
    [autoit]

    $ininame = @ScriptDir & "\calendar.ini"
    $section_notes = "notes"
    $read_current_date_last = ""
    $delimeter = "/CRLF\"
    $path_autostart = @StartupDir & "\" & @ScriptName
    $date = @YEAR & "/" & @MON & "/" & @MDAY

    [/autoit] [autoit][/autoit] [autoit]

    If Not FileExists ( $path_autostart ) Then
    FileCreateShortcut ( @ScriptFullPath, $path_autostart )
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate( "Kalender", 409, 207, 282, 192)
    GUISetFont(11, 400, 0, "Comic Sans MS")
    $MonthCal1 = GUICtrlCreateMonthCal( $date, 0, 0, 180, 164)
    $Edit1 = GUICtrlCreateEdit("", 184, 0, 217, 161)
    $Button1 = GUICtrlCreateButton("Speichern", 184, 168, 219, 33, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1

    $read_current_date = GUICtrlRead ( $MonthCal1 )
    If $read_current_date <> $read_current_date_last Then
    $read_current_note = IniRead ( $ininame, $section_notes, $read_current_date, "" )
    $read_current_note = StringReplace ( $read_current_note, $delimeter, @CRLF )
    GUICtrlSetData ( $Edit1, $read_current_note )
    $read_current_date_last = $read_current_date
    EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1 ;änderungen speichern
    $read_date = GUICtrlRead ( $MonthCal1 )
    $read_note = GUICtrlRead ( $Edit1 )
    $read_note = StringReplace ( $read_note, @CRLF, $delimeter )
    IniWrite ( $ininame, $section_notes, $read_date, $read_note )


    EndSwitch
    WEnd

    [/autoit]