Jump to content

GUICtrlSetData( $Date_1, "1/3/2008")


DW1
 Share

Recommended Posts

I am trying to modify the date displayed by this:

$Date_1 = GuiCtrlCreateDate("Date1", 50, 70, 290, 20, BitOR($DTS_SHORTDATEFORMAT, $DTS_SHOWNONE))oÝ÷ Ùh­Øb²X§zܡ׺Ú"µÍÕRPÝÙ]]J ÌÍÑ]WÌK ][ÝÌKÌËÌ   ][ÝÊ
But I do not get the results I expected..... how do I get this to work, what am I doing wrong.

Thanks again guys, this is the best support forum I have ever been to.

Link to comment
Share on other sites

I am trying to modify the date displayed by this:

$Date_1 = GuiCtrlCreateDate("Date1", 50, 70, 290, 20, BitOR($DTS_SHORTDATEFORMAT, $DTS_SHOWNONE))

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

Can't seem to be able to edit my post without generating garbage:

Date order correction:

GUICtrlSetData( $Date_1, "2008-01-03")

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

Also, this is another way to reformat the date:

Global $date = GUICtrlRead($dteRstdate)
            Global $newdate = StringSplit($date, "/")
            
            If StringLen($newdate[2]) < 2 Then
                Global $day = "0" & $newdate[2]
            Else
                Global $day = $newdate[2]
            EndIf
            
            If StringLen($newdate[1]) < 2 Then
                Global $mon = "0" & $newdate[1]
            Else
                Global $mon = $newdate[1]
            EndIf
            
            Global $yr = StringRight($newdate[3], 2)
            Global $date = $mon & "/" & $day & "/" & $yr

I like this way more because I know exactly what is being outputted... no guessing for me. Also, I do this because I want the default date to be set to today... and the easiest way for that through a date function (that I've found) is to leave the date set to blank.

Edited by Tasmania
Link to comment
Share on other sites

Here's the example from the new beta

#include <GuiConstants.au3>
#include <GuiDateTimePicker.au3>

Opt('MustDeclareVars', 1)

$Debug_DTP = False ; Check ClassName being passed to DTP functions, set to True and use a handle to another control to see it work

Global $hDTP

Example_Internal() ;use autoit built-in control
Example_External() ;use UDF built control

Func Example_Internal()
    Local $hGUI

    ; Create GUI
    $hGUI = GUICreate("(Internal) DateTimePick Set Format", 400, 300)
    $hDTP = GUICtrlGetHandle(GUICtrlCreateDate("", 2, 6, 190))

    GUISetState()

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    ; Set the display format
    _GUICtrlDTP_SetFormat ($hDTP, "ddd MMM dd, yyyy hh:mm ttt")

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_Internal

Func Example_External()
    Local $hGUI

    ; Create GUI
    $hGUI = GUICreate("(External) DateTimePick Set Format", 400, 300)
    $hDTP = _GUICtrlDTP_Create ($hGUI, 2, 6, 190, 21, $DTS_SHORTDATEFORMAT )
    GUISetState()

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    ; Set the display format
;~    _GUICtrlDTP_SetFormat ($hDTP, "ddd MMM dd, yyyy hh:mm ttt")

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_External

Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        Case $hDTP
            Switch $iCode
                Case $DTN_CLOSEUP ; Sent by a date and time picker (DTP) control when the user closes the drop-down month calendar
                    _DebugPrint("$DTN_CLOSEUP" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
                            "-->Code:" & @TAB & $iCode)
                    ; The return value for this notification is not used
                Case $DTN_DATETIMECHANGE ; Sent by a date and time picker (DTP) control whenever a change occurs
                    Local $tInfo = DllStructCreate($tagNMDATETIMECHANGE, $ilParam)
                    _DebugPrint("$DTN_DATETIMECHANGE" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->Flag:" & @TAB & DllStructGetData($tInfo, "Flag") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond"))
                    Return 0
                Case $DTN_DROPDOWN ; Sent by a date and time picker (DTP) control when the user activates the drop-down month calendar
                    _DebugPrint("$DTN_DROPDOWN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
                            "-->Code:" & @TAB & $iCode)
                    ; The return value for this notification is not used
                Case $DTN_FORMAT ; Sent by a date and time picker (DTP) control to request text to be displayed in a callback field
                    Local $tInfo = DllStructCreate($tagNMDATETIMEFORMAT, $ilParam)
                    Local $tBuffer = DllStructCreate("char Format[128]", DllStructGetData($tInfo, "Format"))
                    Local $tBuffer2 = DllStructCreate("char Display[64]", DllStructGetData($tInfo, "pDisplay"))
                    _DebugPrint("$DTN_FORMAT" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->Format:" & @TAB & DllStructGetData($tBuffer, "Format") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond") & @LF & _
                            "-->Display:" & @TAB & DllStructGetData($tBuffer2, "Display"))
                    Return 0
                Case $DTN_FORMATQUERY ; Sent by a date and time picker (DTP) control to retrieve the maximum allowable size of the string that will be displayed in a callback field
                    Local $tInfo = DllStructCreate($tagNMDATETIMEFORMATQUERY, $ilParam)
                    Local $tBuffer = DllStructCreate("char Format[128]", DllStructGetData($tInfo, "Format"))
                    _DebugPrint("$DTN_FORMATQUERY" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->Format:" & @TAB & DllStructGetData($tBuffer, "Format") & @LF & _
                            "-->SizeX:" & @TAB & DllStructGetData($tInfo, "SizeX") & @LF & _
                            "-->SizeY:" & @TAB & DllStructGetData($tBuffer2, "SizeY"))
                    DllStructSetData($tInfo, "SizeX", 64)
                    DllStructSetData($tInfo, "SizeY", 10)
                    Return 0
                Case $DTN_USERSTRING ; Sent by a date and time picker (DTP) control when a user finishes editing a string in the control
                    Local $tInfo = DllStructCreate($tagNMDATETIMESTRING, $ilParam)
                    Local $tBuffer = DllStructCreate("char UserString[128]", DllStructGetData($tInfo, "UserString"))
                    _DebugPrint("$DTN_USERSTRING" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->UserString:" & @TAB & DllStructGetData($tBuffer, "UserString") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond") & @LF & _
                            "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags"))
                    Return 0
                Case $DTN_WMKEYDOWN ; Sent by a date and time picker (DTP) control when the user types in a callback field
                    Local $tInfo = DllStructCreate($tagNMDATETIMEFORMATQUERY, $ilParam)
                    Local $tBuffer = DllStructCreate("char Format[128]", DllStructGetData($tInfo, "Format"))
                    _DebugPrint("$DTN_WMKEYDOWN" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->VirtKey:" & @TAB & DllStructGetData($tInfo, "VirtKey") & @LF & _
                            "-->Format:" & @TAB & DllStructGetData($tBuffer, "Format") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond"))
                    Return 0
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY

Func _DebugPrint($s_text, $line = @ScriptLineNumber)
    ConsoleWrite( _
            "!===========================================================" & @LF & _
            "+======================================================" & @LF & _
            "-->Line(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _
            "+======================================================" & @LF)
EndFunc   ;==>_DebugPrint

look up _GUICtrlDTP_SetFormat in the help file for more information on formating the date.

also look up _GUICtrlDTP_Create

Edited by GaryFrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Here's the example from the new beta

#include <GuiConstants.au3>
#include <GuiDateTimePicker.au3>

Opt('MustDeclareVars', 1)

$Debug_DTP = False ; Check ClassName being passed to DTP functions, set to True and use a handle to another control to see it work

Global $hDTP

Example_Internal() ;use autoit built-in control
Example_External() ;use UDF built control

Func Example_Internal()
    Local $hGUI

    ; Create GUI
    $hGUI = GUICreate("(Internal) DateTimePick Set Format", 400, 300)
    $hDTP = GUICtrlGetHandle(GUICtrlCreateDate("", 2, 6, 190))

    GUISetState()

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    ; Set the display format
    _GUICtrlDTP_SetFormat ($hDTP, "ddd MMM dd, yyyy hh:mm ttt")

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_Internal

Func Example_External()
    Local $hGUI

    ; Create GUI
    $hGUI = GUICreate("(External) DateTimePick Set Format", 400, 300)
    $hDTP = _GUICtrlDTP_Create ($hGUI, 2, 6, 190, 21, $DTS_SHORTDATEFORMAT )
    GUISetState()

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    ; Set the display format
;~    _GUICtrlDTP_SetFormat ($hDTP, "ddd MMM dd, yyyy hh:mm ttt")

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example_External

Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
        Case $hDTP
            Switch $iCode
                Case $DTN_CLOSEUP ; Sent by a date and time picker (DTP) control when the user closes the drop-down month calendar
                    _DebugPrint("$DTN_CLOSEUP" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
                            "-->Code:" & @TAB & $iCode)
                    ; The return value for this notification is not used
                Case $DTN_DATETIMECHANGE ; Sent by a date and time picker (DTP) control whenever a change occurs
                    Local $tInfo = DllStructCreate($tagNMDATETIMECHANGE, $ilParam)
                    _DebugPrint("$DTN_DATETIMECHANGE" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->Flag:" & @TAB & DllStructGetData($tInfo, "Flag") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond"))
                    Return 0
                Case $DTN_DROPDOWN ; Sent by a date and time picker (DTP) control when the user activates the drop-down month calendar
                    _DebugPrint("$DTN_DROPDOWN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
                            "-->Code:" & @TAB & $iCode)
                    ; The return value for this notification is not used
                Case $DTN_FORMAT ; Sent by a date and time picker (DTP) control to request text to be displayed in a callback field
                    Local $tInfo = DllStructCreate($tagNMDATETIMEFORMAT, $ilParam)
                    Local $tBuffer = DllStructCreate("char Format[128]", DllStructGetData($tInfo, "Format"))
                    Local $tBuffer2 = DllStructCreate("char Display[64]", DllStructGetData($tInfo, "pDisplay"))
                    _DebugPrint("$DTN_FORMAT" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->Format:" & @TAB & DllStructGetData($tBuffer, "Format") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond") & @LF & _
                            "-->Display:" & @TAB & DllStructGetData($tBuffer2, "Display"))
                    Return 0
                Case $DTN_FORMATQUERY ; Sent by a date and time picker (DTP) control to retrieve the maximum allowable size of the string that will be displayed in a callback field
                    Local $tInfo = DllStructCreate($tagNMDATETIMEFORMATQUERY, $ilParam)
                    Local $tBuffer = DllStructCreate("char Format[128]", DllStructGetData($tInfo, "Format"))
                    _DebugPrint("$DTN_FORMATQUERY" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->Format:" & @TAB & DllStructGetData($tBuffer, "Format") & @LF & _
                            "-->SizeX:" & @TAB & DllStructGetData($tInfo, "SizeX") & @LF & _
                            "-->SizeY:" & @TAB & DllStructGetData($tBuffer2, "SizeY"))
                    DllStructSetData($tInfo, "SizeX", 64)
                    DllStructSetData($tInfo, "SizeY", 10)
                    Return 0
                Case $DTN_USERSTRING ; Sent by a date and time picker (DTP) control when a user finishes editing a string in the control
                    Local $tInfo = DllStructCreate($tagNMDATETIMESTRING, $ilParam)
                    Local $tBuffer = DllStructCreate("char UserString[128]", DllStructGetData($tInfo, "UserString"))
                    _DebugPrint("$DTN_USERSTRING" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->UserString:" & @TAB & DllStructGetData($tBuffer, "UserString") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond") & @LF & _
                            "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags"))
                    Return 0
                Case $DTN_WMKEYDOWN ; Sent by a date and time picker (DTP) control when the user types in a callback field
                    Local $tInfo = DllStructCreate($tagNMDATETIMEFORMATQUERY, $ilParam)
                    Local $tBuffer = DllStructCreate("char Format[128]", DllStructGetData($tInfo, "Format"))
                    _DebugPrint("$DTN_WMKEYDOWN" & @LF & "--> hWndFrom:" & @TAB & DllStructGetData($tInfo, "hWndFrom") & @LF & _
                            "-->IDFrom:" & @TAB & DllStructGetData($tInfo, "IDFrom") & @LF & _
                            "-->Code:" & @TAB & DllStructGetData($tInfo, "Code") & @LF & _
                            "-->VirtKey:" & @TAB & DllStructGetData($tInfo, "VirtKey") & @LF & _
                            "-->Format:" & @TAB & DllStructGetData($tBuffer, "Format") & @LF & _
                            "-->Year:" & @TAB & DllStructGetData($tInfo, "Year") & @LF & _
                            "-->Month:" & @TAB & DllStructGetData($tInfo, "Month") & @LF & _
                            "-->DOW:" & @TAB & DllStructGetData($tInfo, "DOW") & @LF & _
                            "-->Day:" & @TAB & DllStructGetData($tInfo, "Day") & @LF & _
                            "-->Hour:" & @TAB & DllStructGetData($tInfo, "Hour") & @LF & _
                            "-->Minute:" & @TAB & DllStructGetData($tInfo, "Minute") & @LF & _
                            "-->Second:" & @TAB & DllStructGetData($tInfo, "Second") & @LF & _
                            "-->MSecond:" & @TAB & DllStructGetData($tInfo, "MSecond"))
                    Return 0
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY

Func _DebugPrint($s_text, $line = @ScriptLineNumber)
    ConsoleWrite( _
            "!===========================================================" & @LF & _
            "+======================================================" & @LF & _
            "-->Line(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _
            "+======================================================" & @LF)
EndFunc   ;==>_DebugPrint

look up _GUICtrlDTP_SetFormat in the help file for more information on formating the date.

also look up _GUICtrlDTP_Create

Isn't the Date Time Picker different from the GUICtrlCreateDate? Doesn't that display the calander right on the form?
Link to comment
Share on other sites

Isn't the Date Time Picker different from the GUICtrlCreateDate? Doesn't that display the calander right on the form?

No your thinking of the _GUICtrlMonthCal_xxxxxx functions

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...