user52 Posted May 25, 2007 Share Posted May 25, 2007 -hidden from taskbar -always on top -no tray icon -minimal desktop real estate expandcollapse popup;~ HotKeySet("{ESC}", "_Exit") #NoTrayIcon #include <GUIConstants.au3> $w = 196 $h = 17 $Parent = GUICreate("") $gui = GUICreate("", $w, $h, (@DesktopWidth - $w - 3) / 2, @DesktopHeight - $h - 28 - 1, $WS_POPUP, $WS_EX_TOPMOST, $Parent) GUISetBkColor(0xffffff) GUISetFont(10, 400, 0, "arial") $date = GUICtrlCreateLabel("", 3, 1, 500, 500) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GuiSetState() Update() Func Update() While 1 $h = @HOUR $m = @MIN If $h > 12 Then $h = $h - 12 $m = $m & " PM" Else If $h = 12 Then $m = $m & " PM" Else $m = $m & " AM" EndIf EndIf GUICtrlSetData($date, GetDayOfWeek() & ", " & GetMonth() & " " & @MDAY & ", " & @YEAR & " " & $h & ":" & $m) Sleep(500) GUICtrlSetData($date, GetDayOfWeek() & ", " & GetMonth() & " " & @MDAY & ", " & @YEAR & " " & $h & " " & $m) Sleep(500) WEnd EndFunc Func _Exit() Exit EndFunc Func GetDayOfWeek() $a = @WDAY If $a = 1 Then Return "Sunday" If $a = 2 Then Return "Monday" If $a = 3 Then Return "Tuesday" If $a = 4 Then Return "Wednesday" If $a = 5 Then Return "Thursday" If $a = 6 Then Return "Friday" If $a = 7 Then Return "Saturday" EndFunc Func GetMonth() $a = @MON If $a = 1 Then Return "January" If $a = 2 Then Return "February" If $a = 3 Then Return "March" If $a = 4 Then Return "April" If $a = 5 Then Return "May" If $a = 6 Then Return "June" If $a = 7 Then Return "July" If $a = 8 Then Return "August" If $a = 9 Then Return "September" If $a = 10 Then Return "October" If $a = 11 Then Return "November" If $a = 12 Then Return "December" EndFunc 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