March 4, 2016 at 7:29 AM by Dr. Drang
I have a tendency to think of scripting and other forms of automation as a way of turning a process from a long series of steps into a single step. But sometimes even a single-step process can be automated. One of my favorite Keyboard Maestro macros does just that.
The least fun part of my job is scanning through long sets of documents about a piece of machinery or a structure to find and isolate the pages with information I can use in an engineering analysis. In the old days, my clients would send me bankers boxes full of documents, and I got pretty good at flipping through stacks of paper quickly to find the useful bits.
Now the documents are PDFs, with each PDF containing hundreds or even thousands of pages. This saves paper and (especially) space, but the scanning process usually isn’t as fast. I can riffle through dozens of physical sheets of paper and know within a second or two whether they’re going to contain anything helpful. PDF viewers force me to look at them one or two pages at a time.
Sometimes searching can speed things up, but almost all of the PDFs I get have been generated by scanning paper documents, and the OCR—when it’s done—is untrustworthy. Drawings, tables, and handwritten notes are a big part of what I’m looking for, and those don’t lend themselves to accurate OCR.
So I plod through the PDFs a page at a time, tapping the down arrow key as fast as I can while still going slow enough to recognize what I’m seeing before moving on. Or at least that’s what I used to do before I realized that even the single step of pressing a key can be automated. Now I use this Keyboard Maestro macro:
I start by opening a PDF in Preview, putting the sidebar in thumbnail view, and clicking on the first thumbnail. This displays the first page of the document in the display area but puts the focus for subsequent actions on the sidebar. With this setup, pressing the down arrow key moves to the next page.
The macro does nothing more than repeat the down arrow tapping action every half second indefinitely. I’ve found this to be a reasonable pace for marching through documents. When I get to one I think is useful, I press the Return key to stop the macro. Sometimes I’m a little slow and have to back up a page or two, but overall this makes the tedious work of paging though a long document go faster than any other method I’ve tried.
You might think that just holding down the arrow key would be similar to my previous method of riffling through a handful of paper. In my experience, that doesn’t work nearly as well as the half-second march, because the rendering speed can vary significantly from page to page, and some pages go by so fast they don’t register with me.
I haven’t mentioned this macro before because it seemed too simple to bother with. But as I was working through a 2,000 page PDF yesterday, I realized how helpful it’s been to me and thought it might prompt you to come up with a similar macro for your own work. These embarrassingly simple bits of automation are often the most useful.