How To Assign A Hotkey To Almost Anything

March 26, 2013
Updated on: March 26, 2013 at 10:38

How To Assign A Hotkey To Almost Anything → via @_patrickwelker

Here’s a short and sweet addition to my ongoing series of Keyboard Maestro macros. In this example I use Google Chrome once you get to basic principle you can make it work in any browser (or any application as a matter of fact).

A couple posts ago I told you the reason why Google Chrome is my favorite browser. In the section where I introduced my favorite extensions I mentioned SingleFile which mimics the “Save as Web Archive” function in Safari. My only problem with the extension was that it doesn’t let you assign a shortcut to it. But as you already might have noticed, the word “no” does not exists in the official Keyboard Maestro dictionary. There’s only a blank page where it should be.

In the following Macro I make use of the “Find Image” action in Keyboard Maestro to trigger the extension, wait for it to process the page and then click on the link to save the quasi web archive.

What you need is (1) Keyboard Maestro, (2) the SingleFile extension installed and (3) these three image files:

SingleFileImages

I would have provided the images here, but as you can see from the picture above, I use the non-default black and white extension icons in Google Chrome (which you can read about in the aforementioned posts if you’re curious).

This is the macro:

km-singlefile

Note: In the “Pause Until Condition is Met” action you can also use a picture of the “Click here to save the page” notification which I use the subsequent step. My subjective impression was that Keyboard Maestro was able to identify the smaller confirmation button a bit faster that’s why I setup the macro with three images instead of two.

The deletion of the ‘location’ variable we created is optional. But since we don’t need to clutter up our token library it’s as easy as setting a variable to the text %Delete% to get rid of it.

In addition, this macro won’t work if you have two browser windows open side by side since Keyboard Maestro woulnd’t know on which window it should save the page.1 However, you could always hit ⌘M on the window that isn’t needed and you’re good to go.

Finally, although I have some macros set with the “Find Image” action I wouldn’t advise you to go nuts with it. Keyboard Maestro takes a while to find the image on your screen. So the use cases are too limited to use it everywhere. Still, if you need a very special macro it certainly can put the shoulder to the wheel.

  1. That’s also the reason why you should hide your Keyboard Maestro window with the macro when testing it.

comments powered by Disqus

Related Posts