1

From a keyboard shortcut I want to add this text

Custom text - 31/12/09 - 10:00:15(GMT)

Time, date and Time zone should be taken from System in same format.

2 Answers 2

1
^!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.

16
  • is timezone dynamic? Jan 9, 2010 at 17:44
  • based on system time
    – RJFalconer
    Jan 9, 2010 at 17:46
  • Nope, but I'm working on it :)
    – Phoshi
    Jan 9, 2010 at 17:46
  • Right, I don't believe AHK can get what timezone you are, but if you use A_NowUTC instead of the blank argument after CurrentDateTime, you can be sure it's GMT. Best I've got, sorry :(
    – Phoshi
    Jan 9, 2010 at 17:50
  • @BlueNovember - I mean system and timezone can be changed Jan 9, 2010 at 17:50
0

You can cause Notepad to put the current date and time into the bottom of a file every time it is opened. Save ".LOG" in the top of the contents of the file. The resulting format is

hh:mm dd/mm/yyyy

Although probably not what you're after, it's an interesting trick that may be useful to someone coming from Google.

1
  • u can easily add through F5 in notepad Jan 9, 2010 at 17:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .