Hi, vielleicht ist eh ganz einfach aber ich schaff es nicht.
Wie kann ich vom _GUICtrlDTP_Create Feld das ausgewählte Datum auslesen?
Danke
Magic
Hi, vielleicht ist eh ganz einfach aber ich schaff es nicht.
Wie kann ich vom _GUICtrlDTP_Create Feld das ausgewählte Datum auslesen?
Danke
Magic
Versuch mal _GUICtrlDTP_GetSystemTime.
Hallo Magicmercury.
wenn du GUICtrlCreateDate anstelle von _GUICtrlDTP_Create nimmst kannst du auch mit GuiCtrlRead abfragen:
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiDateTimePicker.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_Main()
Exit
Func _Main()
Local $hGUI, $hDTP, $hBtn, $msg
; Erstellt eine GUI
$hGUI = GUICreate("DateTimePick: Erstellen (UDF)", 400, 300)
$hDTP = GUICtrlCreateDate($hGUI, 2, 6, 190)
$hBtn = GUICtrlCreateButton("&Datum",2,30,190)
GUISetState()
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
while 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
case $hBtn
MsgBox(0,"",GUICtrlRead($hDTP))
EndSwitch
WEnd
GUIDelete()
EndFunc ;==>_Main
genauso bei GUICtrlCreateMonthCal:
#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiDateTimePicker.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]_Main()
Exit
Func _Main()
Local $hGUI, $hDTP, $hBtn, $msg
; Erstellt eine GUI
$hGUI = GUICreate("DateTimePick: Erstellen (UDF)", 400, 300)
$hDTP = GUICtrlCreateMonthCal($hGUI, 2, 6, 190,-1,BitOr($MCS_NOTODAY,$MCS_WEEKNUMBERS))
$hBtn = GUICtrlCreateButton("&Datum",2,270,190)
GUISetState()
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
while 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
case $hBtn
MsgBox(0,"",GUICtrlRead($hDTP))
EndSwitch
WEnd
GUIDelete()
EndFunc ;==>_Main
mfg (Auto)Bert