Home » Questions » Computers [ Ask a new question ]

How to add timestamp with custom text using keyboard shortcut?

How to add timestamp with custom text using keyboard shortcut?

From a keyboard shortcut I want to add this text

Asked by: Guest | Views: 419
Total answers/comments: 1
bert [Entry]

"^!v::
FormatTime, CurrentDateTime,, dd/MM/yyyy - hh:mm:ss
SendRaw Jitendra - %CurrentDateTime%(GMT)
Return

The proof: Jitendra - 09/01/2010 - 05:41:15(GMT)

edit:
Alright, try this:

^!v::
FormatTime, CurrentDateTime,, dd/MM/yyyy - hh:mm:ss
time:=A_Now
EnvSub, time, A_NowUTC, Hours
SendRaw Jitendra - %CurrentDateTime%(GMT
if time>0
sendraw +%time%
if time<0
sendraw %time%
sendraw )
Return

It's by no means perfect (and I actually haven't tested it, too much effort to change timezones), but it's conceptually sound, and should output things like GMT+1, or GMT-2, or something."