Warum überhaupt ein Input-Control? Es gibt doch GUICtrlCreateDate().
Aus der Hilfe:
Spoiler anzeigen
[autoit]
#include <GUIConstantsEx.au3>
#include <DateTimeConstants.au3>
Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit]Example2()
[/autoit] [autoit][/autoit] [autoit]; example2
Func Example2()
Local $n, $msg
GUICreate("My GUI get time")
$n = GUICtrlCreateDate("", 20, 20, 100, 20, $DTS_TIMEFORMAT)
GUISetState()
; Run the GUI until the dialog is closed
Do
$msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
MsgBox(0, "Time", GUICtrlRead($n))
GUIDelete()
EndFunc ;==>Example2
Dort wird eine Falscheingabe doch sowieso verhindert.