autohotkey clock code example

Example: autohotkey clock

;display the date and time, useful for print screen
#SingleInstance Force

Gui, +AlwaysOnTop +ToolWindow -SysMenu -Caption
Gui, Font, s14 cWhite Bold, Tahoma ; Set font parameters here
Gui, margin, 5,0
Gui, Color, 000000 ;Background color
Gui, Add, Text, vD y0, %A_YYYY%-%A_MM%-%A_DD% %a_hour%:%a_min%:%a_sec%
Gui, Show, W210 H19 x750 y0,clock; screen position here
SetTimer, RefreshD, 500
return

RefreshD:
GuiControl,, D, %A_YYYY%-%A_MM%-%A_DD% %a_hour%:%a_min%:%a_sec%
return

;https://autohotkey.com/board/topic/122021-most-efficient-simple-gui-clock/

Tags:

Misc Example