power1power1 Posted January 11, 2014 Share Posted January 11, 2014 Hello, I am thinking of chnaging the taskbar clock format to show like this in two lines: 10:12:34 AM PDT Sat. 11 Jan 2014 Any clue as where to start is appreciated. Thanks! Link to comment Share on other sites More sharing options...
Rogue5099 Posted January 11, 2014 Share Posted January 11, 2014 Not really AutoIt but you can do this by Start button , clicking Control Panel, clicking Clock, Language, and Region, and then clicking Region and Language. Click Additional Settings, Date Tab, and in short date enter: ddd dd MMM yyyy My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
power1power1 Posted January 11, 2014 Author Share Posted January 11, 2014 (edited) Thanks for the reply. I know T-Clock 2010 here: http://www.donationcoder.com/forum/index.php?topic=21944.0 does that. It has a few extra features which I don't need, so I thought I would write a little piece of Autoit code to do just that. Edited January 11, 2014 by power1power1 Link to comment Share on other sites More sharing options...
power1power1 Posted January 12, 2014 Author Share Posted January 12, 2014 OK, it seems it may not be an easy task to do. Another question then: When running an Autoit script, is it possible to have a text box, instead of the icon, in the notification area? I am thinking of updating the text in that text box. Link to comment Share on other sites More sharing options...
Rogue5099 Posted January 12, 2014 Share Posted January 12, 2014 You could create a GUI that covers the taskbar area over the clock and overlay your own clock. Here is a start just need to update the label with Time and Date to your liking format and tweak in position, color, ect. #NoTrayIcon #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Misc.au3> #include <StaticConstants.au3> HotKeySet("{ESC}", "_Exit") GuiCreate("NewClock", 100, 40, @DesktopWidth-120, @DesktopHeight-40, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor(0x070C0F) GUICtrlCreateLabel("1:50 PM" & @CRLF & "Sun 12 Jan 2014", 1, 5, 100, 40, $SS_CENTER) GUICtrlSetBkColor(-1, 0x070C0F) GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) While 1 Sleep(50) WEnd Func _Exit() Exit EndFunc My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
power1power1 Posted January 12, 2014 Author Share Posted January 12, 2014 (edited) Great, thanks Universalist! One question though: The created GUI may cover some of the rightmost icons in the notification area. Is there a way to set the position of the rightmost icon in the notification area? Edited January 12, 2014 by power1power1 Link to comment Share on other sites More sharing options...
Rogue5099 Posted January 12, 2014 Share Posted January 12, 2014 (edited) Just change the GUI size to fit within the clock area and adjust the position as well. When I created the GUI it didn't cover up any of my icons but my time/date in the corner maybe a little bigger cause I already have the date and time in mine. Also change the Font of the label (text) to get what you want. You can increase the size of the time/date by following changing the format above to increase default size of the area then overlapping the GUI to be able to fit what you want in that area. Edited January 12, 2014 by Rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
power1power1 Posted January 12, 2014 Author Share Posted January 12, 2014 Sure. Still, it would be nice if one could set the position of the rightmost icon so that a bigger area would be available. Link to comment Share on other sites More sharing options...
Rogue5099 Posted January 12, 2014 Share Posted January 12, 2014 (edited) This fits perfectly in my taskbar covering up the time. You might also need to change the date format on your computer to make _NowDate display how you want it to. expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <Date.au3> HotKeySet("{ESC}", "_Exit") Global $Lastsec, $Lastmin GuiCreate("NewClock", 100, 40, @DesktopWidth-120, @DesktopHeight-36, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor(0x070C0F) $Timedate = GUICtrlCreateLabel("", 1, 3, 100, 40, $SS_CENTER) GUICtrlSetFont(-1, 9, 400) GUICtrlSetBkColor(-1, 0x070C0F) GUICtrlSetColor(-1, 0xFFFFFF) $Date = _NowDate() GUICtrlSetData(-1, _NowTime() & @CRLF & $Date) AdlibRegister("UpdateTime", 200) GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func UpdateTime() Local $CurrentSec = @SEC ;Prevents flickering Local $Currentmin = @MIN ;Prevents flickering If $CurrentSec <> $Lastsec Then $Lastsec = $CurrentSec GUICtrlSetData($Timedate, _NowTime() & @CRLF & $Date) EndIf If $Currentmin <> $Lastmin Then $Lastmin = $Currentmin $Date = _NowDate() GUICtrlSetData($Timedate, _NowTime() & @CRLF & $Date) EndIf EndFunc ;==>UpdateTime Func _Exit() Exit EndFuncEdit: Added ToolTip like windows has. I was also trying to allow double click label to run ShellExecute("timedate.cpl") but was not successful. expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <Date.au3> HotKeySet("{ESC}", "_Exit") Global $Lastsec, $Lastmin GuiCreate("NewClock", 100, 40, @DesktopWidth-120, @DesktopHeight-36, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor(0x070C0F) $Timedate = GUICtrlCreateLabel("", 1, 3, 100, 40, $SS_CENTER) GUICtrlSetTip(-1, _DateTimeFormat(_NowCalc(), 1), "", 0, 1) GUICtrlSetFont(-1, 9, 400) GUICtrlSetBkColor(-1, 0x070C0F) GUICtrlSetColor(-1, 0xFFFFFF) $Date = _NowDate() GUICtrlSetData(-1, _NowTime() & @CRLF & $Date) AdlibRegister("UpdateTime", 200) GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func UpdateTime() Local $CurrentSec = @SEC ;Prevents flickering Local $Currentmin = @MIN ;Prevents flickering If $CurrentSec <> $Lastsec Then $Lastsec = $CurrentSec GUICtrlSetData($Timedate, _NowTime() & @CRLF & $Date) $FullTime = _NowCalc() EndIf If $Currentmin <> $Lastmin Then $Lastmin = $Currentmin $Date = _NowDate() GUICtrlSetTip($Timedate, _DateTimeFormat(_NowCalc(), 1), "", 0, 1) GUICtrlSetData($Timedate, _NowTime() & @CRLF & $Date) EndIf EndFunc ;==>UpdateTime Func _Exit() Exit EndFunc Edited January 12, 2014 by Rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
power1power1 Posted January 12, 2014 Author Share Posted January 12, 2014 Very good, thanks! I think this can be used to provide for a clock on the second monitor's taskbar, as well. 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