Rahul Rohela Posted October 13, 2005 Share Posted October 13, 2005 Please post script to display time On GUI window. Dispaly should change with PC Clock. I mean to say SHow time with changing Minutes & seconds. Link to comment Share on other sites More sharing options...
BigDod Posted October 13, 2005 Share Posted October 13, 2005 Please post script to display time On GUI window. Dispaly should change with PC Clock.I mean to say SHow time with changing Minutes & seconds.Here is one I found in Scripts and Scraps a while back. I cant remember who wrote it.expandcollapse popup#include <GuiConstants.au3> Global $sec = @SEC, $minute, $hour, $light, $time, $clocklabel opt("WinWaitDelay", 100) opt("WinTitleMatchMode", 4) opt("WinDetectHiddenText", 1) opt("MouseCoordMode", 0) GUICreate("Max's Clock", 200, 50, (@DesktopWidth - 188) / 2, (@DesktopHeight - 59) / 2) $clocklabel = GUICtrlCreateLabel("Loading...", 5, 5, 190, 40, 0x1000) GUICtrlSetFont($clocklabel, 24) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then ExitLoop ElseIf $sec <> @SEC Then GUICtrlSetData($clocklabel, TimeSet()) AlarmCheck(TimeSet()) EndIf WEnd Exit Func AlarmCheck($time) If $time = "9:00:00 PM"Then MsgBox(0,"","Time to call it a night");Alarm function(configure how wanted) EndIf EndFunc ;==>AlarmCheck Func TimeSet() $light = " AM" $hour = @HOUR $minute = @MIN $sec = @SEC If $hour = 0 Then $hour = 12 ElseIf $hour = 12 Then $light = " PM" ElseIf $hour > 12 Then $hour = (@HOUR) - 12 $light = " PM" EndIf $time = $hour & ":" & $minute & ":" & $sec & $light Return $time EndFunc ;==>TimeSet Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now