Thursday, March 24, 2011

Tool of the Day: AutoHotKey

I'm back to using a Google Spreadsheet to track my time instead of a cloud based app (more on this later, perhaps). I've setup a really simple spreadsheet do this, and it's refreshing compared to the more complicated UI I've been dealing with over the last year.

But, there is one little annoyance that the fancier time tracking solution had to offer: a built in timer. With my Google Spreadsheet, I enter the start and end timestamp, and then calculate the difference to get my task time. Entering the start and end time isn't awful, but it takes a few moments to look over at the clock on my screen and to retype what's there into a spreadsheet cell.

C'mon, this is a computer, I shouldn't have to retype anything. Ever.

I was tempted to rig up a script inside a spreadsheet, but that seemed like overkill. Then it hit me: I bet an old style windows macro would do the trick. You know, the kind where Windows replays you entering in a sequence of keys.

Googling around landed me on AutoHotKey, which looked tempting. I'm always a bit nervous about downloading windows apps that sound too good to be true, so I checked out LifeHacker. Turns out, they recommend AutoHotKey over and over again.

So, I installed it. Got a little overwhelmed by the options/help file, and after a minute or two wrote up this little guy:

;;
;; Insert the current timestamp into an app
;;
#z::
FormatTime, TimeString, , M/d/yyyy hh:mm tt
Send %TimeString%
return

Now, when I press Windows-z, a Google Spreadsheet compliant timestamp is automatically inserted in the current cell.

Not only is that little problem solved, but my eyes have definitely been opened as to what a power tool this guy can be.

So, tell me, what's your favorite automation hack with AutoHotKey?

2 comments:

  1. I play dwarf fortress which is a crazy, complicated game but I love it. Anyway I have made a number of scripts to plan and manage my fortress rather than typing it out myself.

    I've also used it to do quick repetitive text transformations when emacs isn't available.

    But my number one use is to make my caps lock key become delete. All I need to do on a new computer is download the exe from my dropbox account and I'm good to go.

    ReplyDelete
  2. James - those are great suggestions, thanks.

    I usually do the registry hack to turn off the caps lock key (I'm with you, it's one of the first things I have to do on a new computer). I may have to try making it a delete key - that sounds like a good idea.

    -Ben

    ReplyDelete

LinkWithin

Related Posts with Thumbnails