randomboy Posted July 4, 2006 Share Posted July 4, 2006 How do you make a clock? I got inside my house, leant back on my bed and began to think...where the hell was my roof?!?!24 hours in a day....24 beers in a case....Coincidence?? Link to comment Share on other sites More sharing options...
Briegel Posted July 4, 2006 Share Posted July 4, 2006 That's something you can try wonderful by yourself. Have a look at help file 'GUI reference' and 'macro reference - time and date'. If you have problems post your experiment and get help. good luck Link to comment Share on other sites More sharing options...
eynstyne Posted July 4, 2006 Share Posted July 4, 2006 (edited) The label blinks a bit, but keep in mind this was built in less than 5 minutes PM hasn't been implemented... expandcollapse popup#include <GUIConstants.au3> #include <Constants.au3> #include <misc.au3> ;===================================================================== ; The cheapest crappiest clock by Eynstyne ;===================================================================== opt("TrayMenumode",1) $Form1 = GUICreate("Clock", 154, 54, @desktopwidth - 163, @desktopheight - 100, -1, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $font = _choosefont() if not isarray($font) then exit endif GUISetBkColor(0x000000) $clock = GUICtrlCreateLabel("", 7, 15, 154, 36) GUICtrlSetFont(-1, $font[3], $font[4], $font[1], $font[2]);<-- Just get some LCD font or something GUICtrlSetColor(-1, $font[7]) GUICtrlSetBkColor(-1, 0x000000) $fontc = Traycreateitem("&Choose Font") $exit = traycreateitem("&Exit") GUISetState(@SW_SHOW) traysetstate() $ampm = "" While 1 $msg = GuiGetMsg() $t = traygetmsg() select case $t = $exit exit case $t = $fontc $font = _choosefont() if not isarray($font) then continueloop endif GUICtrlSetFont(-1, $font[3], $font[4], $font[1], $font[2]);<-- Just get some LCD font or something GUICtrlSetColor(-1, $font[7]) Case $msg = $GUI_EVENT_CLOSE Exit EndSelect time() wend func time() sleep(20) if @hour = 12 then $hour = @hour - 0 $ampm = "Pm" elseif @hour = 0 then $hour = 12 $ampm = "Am" elseif @hour > 12 then $ampm = "Pm" $hour = @hour - 12 Elseif @hour < 12 then $ampm = "Am" $hour = @hour - 0 elseif @hour > 9 then $hour = @hour - 0 elseif @hour < 9 then $hour = @hour - 0 EndIf guictrlsetdata($clock, $hour & ":" & @MIN & ":" & @SEC & $ampm) winsettitle("Clock","","Clock - " & $hour & ":" & @MIN & ":" & @SEC & $ampm) TraySetTooltip($hour & ":" & @MIN & ":" & @SEC & $ampm) endfunc Edited July 5, 2006 by eynstyne F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] 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