Datum-Generator

  • just 4 fun:

    Spoiler anzeigen
    [autoit]


    Opt("sendkeydelay",0)

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

    #include <date.au3>
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $DateGen = GUICreate("Datum Generator", 232, 134, 192, 114)
    $ger = GUICtrlCreateRadio("Deutsches Format (DD.MM.YYYY)", 16, 48, 201, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $us = GUICtrlCreateRadio("US Format (MM/DD/YYYY)", 16, 72, 209, 17)
    $asia = GUICtrlCreateRadio("Asia Format (YYYY-MM-DD)", 16, 96, 201, 17)
    $info = GUICtrlCreateLabel('Einfügen mit "Ctrl+Y":', 16, 16, 150, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    dim $date = _Now()
    $date = StringSplit($date," ")
    $date = StringSplit($date[1],".")

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

    HotKeySet("^y","dates")

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

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

    Func dates()
    $date = _Now()
    $date = StringSplit($date," ")
    $date = StringSplit($date[1],".")

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

    if GUICtrlRead($ger) = $GUI_CHECKED Then $date = $date[1] & "." & $date[2] & "." & $date[3] ;DD.MM.YYYY - GER
    if GUICtrlRead($us) = $GUI_CHECKED Then $date = $date[2] & "/" & $date[1] & "/" & $date[3] ;MM/DD/YYYY - US
    if GUICtrlRead($asia) = $GUI_CHECKED Then $date = $date[3] & "-" & $date[2] & "-" & $date[1] ;YYYY-MM-DD - Asia

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

    Send($date)
    EndFunc

    [/autoit]


    x0r

    Simon nörgelt, Simon nervt - aber Simon verbessert die Welt. Glaubt er.