Automation

A repetitive task is an excuse to learn more about automation tools. My text automation tool of choice is Emacs, a ridiculously programmable text editor. When it comes to numbers, I can do a lot with equations, pivot tables / data pilot, and judicious use of macros. For general automation on Windows, there’s AutoHotkey.

My threshold for automation is lower than most people’s. When faced with a repetitive task that will take me an afternoon to do, I’ll spend maybe half an hour understanding the task, an hour figuring out how to do it using the tools, and another half hour to an hour completing it with automation’s help. I spend the extra time learning more about the automation tools or sharing what I’ve done.

Even if the time savings are probably not going to be significant, if the task is sufficiently repetitive, I’ll go for the intellectual thrill of automating it. Bonus: if I have to do the task again (which occasionally happens), I have my process all ready to go.

What would it take for people to learn how to automate more things? How do I do it? How did I pick up this habit?

Part of it is knowing the capabilities of a tool. I know that I can simulate mouse clicks and keypresses, so when I catch myself repeating certain motions, I think about how I can automate that.

Part of it is being able to abstract the steps in a procedure. I can figure out what can be easily automated and what needs manual intervention. If I can automate 80% of something, that’s usually enough.

Part of it is being able to program and not being afraid of geeky interfaces.

Part of it is asking if the time-intensive parts of the procedure are really necessary. (Sometimes they’re not.)

I like automation. I wish more people were comfortable doing it.

Want to get started? The best way is probably to pick a tool depending on what you spend most of your time doing, learning lots about your tool, and doing little experiments. For Emacs, it might be learning how to use keyboard macros, then using Lisp. For Excel, learn different functions (I use CONCATENATE and IF a lot). For AutoHotkey, try using it for abbreviations, then expand.

Have fun and save time!

AutoHotkey scripts for switching to windows

Muscle memory helps you be more efficient. Here’s some AutoHotkey code I use to toggle Chrome (F10), Windows Live Writer (F11), or my Freemind mindmap for Life (F12). Make your own! =)

F10::
WinGetActiveTitle, Title
If Instr(Title, "Google Chrome") > 0
{
   WinMinimize, A
}
Else If WinExist("ahk_class Chrome_WindowImpl_0")
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, "C:\Documents and Settings\Administrator\Local Settings\Application 

Data\Google\Chrome\Application\chrome.exe"
}
return
F11::
WinGetActiveTitle, Title
If Instr(Title, "Windows Live Writer") > 0
{
   WinMinimize, A
}
Else If WinExist("ahk_class WindowsForms10.Window.8.app.0.33c0d9d")
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, "C:\Program Files\Windows Live\Writer\WindowsLiveWriter.exe"
}
return
F12::
WinGetActiveTitle, Title
If InStr(Title, "Life.mm") > 0
{
   WinMinimize, A
}
Else IfWinExist Life.mm
{
   WinActivate
   WinMaximize
}
Else 
{
   Run, c:\sacha\Life.mm"
}
return