Advertisement
robertmarkbram

Autohotkey script to compose a gmail message with timestamp

May 31st, 2012
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. ; Autohotkey script to compose a gmail message with a timestamp in place.
  2. ; Thanks to Christysandhoff in this comment on my blog:
  3. ; http://robertmarkbramprogrammer.blogspot.com.au/2011/02/insert-date-into-any-program-using.html#comment-542578019
  4. ; Macros here are only active if we are in Chrome
  5. ; Warning: the value "Chrome_WidgetWin_1" might change (it used to be Chrome_WidgetWin_0).
  6. #IfWinActive, ahk_class Chrome_WidgetWin_1
  7. #.:: ;; Windows key + dot:
  8. ; Check if we are in the gmail tab.
  9. WinGetTitle, Window_Title, A ; A is for the active window
  10. IfInString, Window_Title, Gmail - Google Chrome
  11. {
  12. ; Compose (c), tab to message window, put timestamp + space then cursor up
  13. FormatTime, timestamp,, dddd d MMMM yyyy, hh:mm:ss tt
  14. SendInput, c{tab}{tab}%timestamp%{enter}{enter}{enter}{up}
  15. return
  16. }
  17. Return
  18. #IfWinActive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement