I’ve been checking out Keyboard Maestro’s improved Find Image on Screen action. Peter has done a marvelous job with it. To quote from the change log:
Enhanced performance of finding an image on the screen by 2 to 20 times.
All I have to say is: it’s true, compared to before it’s blazing fast.
Let’s put it to work and create a short cut for closing the Google Chrome downloads bar.
What we will get: after pressing
⌥W the macro will remember your current mouse position, find the close button, press it and set the cursor back to your starting point.
In case you need a step-by-step tutorial:
- Download the source files (image file and macro). Note: in case you want to use the ready-made macro and import it there is just one additional step you have to do: step #5.
- Create a macro group named “Google Chrome” and make it available in the following applications: Google Chrome, and, if you also run Google Chrome Canary just add it too.
- Create the macro and add the first action: Set Variable “temp” to
%CurrentMouse%. The position of your mouse cursor is now saved.
- Add a “Move Or Click Mouse” action from the Interface Control category and adjust the
↓ position by -15. This should be relative to the “found image’s bottom right corner”, so go ahead and choose this entry from the list.
- Drag and drop the
Chrome-Close.png to the image drop zone. Since we fine tuned the position in step 4 the cursor should now be placed exactly over the little X in the downloads bar. You can press “move” in the action to test it. If it works the mouse cursor should be over the icon and it’s hover state should indicate be active coloring the X red.
- Create a “Use Variable” action. What you want is to use the “temp” variable from step 3 “to set the mouse location”.
- Create a “Set Variable to Text” action to clean up the mess you just made. This time set “temp” to
%Delete% which removes the temporary variable from Keyboard Maestro.
The Short Version
Update: As stated in the beginning, this macro’s purpose was to test the capabilities of the “Find Image” feature. If all you want is get this working use this short macro (I certainly forgot it, but a Twitter reminded me to put it in this post too):
But I don’t have a Mac or Keyboard Maestro
For those of you who don’t own a Mac or Keyboard Maestro there is a Chrome Extension which checks your download bar every 5 seconds and cleans it up for you: Always Clear Downloads.
Another alternative would be to make a macro with a hotkey sequence from this SuperUser thread… or skip the macro and use your memory. It might help to image that you’re just about to finish the end boss with a Street Fighter II or Tekken combo (depends on your liking).
I wonder if this is the reason why my beloved Bang On app dropped support for DuckDuckGo recently.
One word: unexpected. I’m surprised to see (a new universal) DuckDuckGo in the App Store.
It’s an excellent search engine but I’m even more surprised by the heavy emphasize of the story component in the app itself. I’m more in the one-thing-well camp - Bang On excelled at this while DuckDuckGo Search & Stories leaves me a bit puzzled. Matter of fact I don’t get it, the stories look a bit like a filler to me. But then again that’s only half the truth, if you dig in the settings you can set to display your recent searches or saved searches and stories.
As to the stories, a post in the Hacker News comment section hints that there is a larger (hi)story behind it.
Let me start this little odyssee by telling you that I have a paperless office, and, that German law requires you to have printouts from all your tax related documents (because my country loves its bureaucracy all documents ought to be numbered too - naturally I loath anything that involves doing my taxes).
So, today’s task involved printing out many documents just to file them away. In this context I should also mention that all my PDF’s live in a Dropbox folder that is available only in the cloud; I unchecked it in the Dropbox settings under “Selective Sync” because I have a rather large collection of literature - aside from my beloved tax documents - and I seldom need access to my PDF’s on my Mac (the iPad is better suited for reading in my opinion and I can access the files there easily).
Instead of using ExpanDrive 3 to mount my Dropbox I decided to print the documents from within my browser. After all Dropbox got this brilliant new preview feature. Why not finally put it to good use?
After the fifth document I was getting annoyed by the same thing that gives me a little bit of a higher blood pressure level since it got introduced: Google Chromes print preview™.
Usually you can work around this by typing holding the option key in the File tab, then you see the “Print using System Dialog…” menu entry along with it’s shortcut
⌥⌘P. Unfortunately (a) I always forget about this and (b) even more unfortunate, I have this shortcut assign to send the URL to Pocket.
It dawned on me that this was the perfect time to act upon it because by doing this I could do something more enjoyable and totally unrelated to taxes. I admit it, sometimes I love those moments that kick you out of doing something productive and lead you into fiddling with your Mac… again….
Keyboard Maestro is there for you. It’s as simple as it can get. You will remap the
⌘P with this macro:
Clever as you are, you might have spotted two things. On the one hand you see that I extended my tinkering time marginally by adding a custom icon, on the other you see that the rule is disabled. The latter leads us to another solution to this problem.
The Permanent Fix
I called it a permanent fix but I’m not sure if this gets overwritten when Chrome receives one of its automatic updates. I’ve just applied the fix so I can’t tell if it does.
I did my research and as so often there was already someone smarter who figured this out for me. In this case it was french blogger Laurent who wrote about a shell command that get’s rid of this pesky proprietary window by disabling it completely and forcing it to fallback to the native print dialog. Here’s his solution:
defaults write com.google.Chrome DisablePrintPreview -boolean true
Restart Google Chrome to make it work. To undo this just change
And, just in case this gets overwritten there would be Hazel to save the day and force the browser to use the native print preview again.
I prepared a rule but haven’t activated it yet because I don’t know if it’s needed at all:
So, if you just in the middle of your taxes I’d encourage you to take a break and get geeky. This way I wouldn’t feel so ashamed about procrastinating again. Thanks.