Created
September 24, 2024 11:27
-
-
Save konijn/8ee11c8100f9489e9d80739f43fdf626 to your computer and use it in GitHub Desktop.
Simple clock to show a clock when the task bar is on auto hide, drag it after loading the script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Display the time, useful for autohiding taskbar and still wanting to see the time | |
;Inspired by; | |
;http://autohotkey.com/board/topic/80594-how-to-enable-drag-for-a-gui-without-a-titlebar | |
#singleinstance force | |
Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption | |
Gui, Color, 000000 ;black | |
Gui, Font, CCCCCC s10 , Aptos Narrow ;red | |
Gui, Add, Text, vD y0, %a_hour%:%a_min%:%a_sec% | |
Gui, Show, NoActivate, Uptime ; screen position here | |
SetTimer, RefreshD, 900 | |
enableGuiDrag() | |
return | |
RefreshD: | |
GuiControl, , D, %a_hour%:%a_min%:%a_sec% | |
return | |
enableGuiDrag(GuiLabel=1) { | |
WinGetPos,,,A_w,A_h,A | |
Gui, %GuiLabel%:Add, Text, x0 y0 w%A_w% h%A_h% +BackgroundTrans gGUI_Drag | |
return | |
GUI_Drag: | |
SendMessage 0xA1,2 ;-- Goyyah/SKAN trick | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment