Code: Select all
!T
FormatTime, Time,, h:mm
SendInput %CurrentDateTime%
Return
Code: Select all
!T
FormatTime, Time,, h:mm
SendInput %CurrentDateTime%
Return
Code: Select all
tmdif:=a_now
tmdif+=-a_nowUTC
msgbox % tmdif
Code: Select all
!T::
CurrentDateTime := A_NowUTC
CurrentDateTime += -5, h
FormatTime, CurrentDateTimeESTshort, % CurrentDateTime, h:mm tt EST
SendInput %CurrentDateTimeESTshort%
Return
Code: Select all
For Item in ComObjGet( "winmgmts:\\.\root\CIMV2" ).ExecQuery( "Select * from Win32_TimeZone" )
StandardName := Item.StandardName
For Each, Word in ( StrSplit( StandardName, " " ), StandardAbrvName := "" )
StandardAbrvName .= SubStr( Word, 1, 1 )
FormatTime, CurrentDateTime, A_Now, % "h:mm tt " StandardAbrvName
SendInput %CurrentDateTime%
Btw, it is better to put %-sign before A_Now, b/c your great script doesn't fail in the end for only one reason: empty string or string of invalid time format are considered as %A_Now%.TLM wrote: ↑06 Jan 2022, 17:31Code: Select all
FormatTime, CurrentDateTime, A_Now, % "h:mm tt " StandardAbrvName