时间停止不前,如何获得当前时间??
本帖最后由 hhasee 于 2009-4-27 15:45 编辑各位大侠,当我加入以下代码时发现秒针止不前,不可有何良策?另想将此时的时间输入到EXCEL上不知又有什么办法!在线等......
GUISetFont(11, 400, 1)
$Date = GUICtrlCreateLabel(@YEAR & "-" & @MON & "-" & @MDAY & " " &@HOUR & ":" & @MIN & ":" & @SEC , 210, 15, 140, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0x000000) GUICtrlSetData ( 控件ID, 数据 [, 默认值] ) #include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 201, 95, 193, 125)
$Label1 = GUICtrlCreateLabel(@YEAR & "-" & @MON & "-" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC, 32, 24, 360, 17)
AdlibEnable("date", 1000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func date()
GUICtrlSetData($Label1, @YEAR & "-" & @MON & "-" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC)
EndFunc ;==>date
输出到EXCEL请参考EXCELUDF 已全数搞定,在此谢谢了!
页:
[1]