hab mir das ganze selbst inner funktion geschrieben xD
Spoiler anzeigen
Func checkinput()
$sday = GUICtrlRead( $sday2)
$smonth = GUICtrlRead( $smonth2)
$syear = GUICtrlRead( $syear2)
$shour = GUICtrlRead( $shour2)
$smin = GUICtrlRead( $smin2)
$eday = GUICtrlRead( $eday2)
$emonth = GUICtrlRead( $emonth2)
$eyear = GUICtrlRead( $eyear2)
$ehour = GUICtrlRead( $ehour2)
$emin = GUICtrlRead( $emin2)
If $sday < 1 Or $eday < 1 And $sday <> "" And $eday <> "" Then
MsgBox(0, "Error", "This number is too low")
GUICtrlSetData( $sday2, @MDAY)
GUICtrlSetData( $eday2, @MDAY)
EndIf
If $sday > 31 Or $eday > 31 Then
MsgBox(0, "Error", "This number is too high")
GUICtrlSetData( $sday2, @MDAY)
GUICtrlSetData( $eday2, @MDAY)
EndIf
If $smonth < 1 Or $emonth < 1 And $smonth <> "" And $emonth <> "" Then
MsgBox(0, "Error", "This number is too low")
GUICtrlSetData( $smonth2, @MON)
GUICtrlSetData( $emonth2, @MON)
EndIf
If $smonth > 12 Or $emonth > 12 Then
MsgBox(0, "Error", "This number is too high")
GUICtrlSetData( $smonth2, @MON)
GUICtrlSetData( $emonth2, @MON)
EndIf
If $shour > 23 Or $ehour > 23 Then
MsgBox(0, "Error", "This number is too high")
GUICtrlSetData( $shour2, @HOUR)
GUICtrlSetData( $ehour2, @HOUR)
EndIf
If $smin > 59 Or $emin > 59 Then
MsgBox(0, "Error", "This number is too high")
GUICtrlSetData( $smin2, @MIN)
GUICtrlSetData( $emin2, @MIN)
EndIf
EndFunc