www 101

All you need to know about the internet

Have a Question?

If you have any question you can ask below or enter what you are looking for!

How to Combine Automation Apps on a Mac

I’ve written a lot about automation apps here at Envato Tuts+. I’ve covered KeyboardMaestro, TextExpander and Hazel in multi-tutorial, deep dives and touched on other apps like Launchbar and BetterTouchTool

All these apps have different specialities. Some do one thing really well and are simple to use, others can do pretty much everything but are super intimidating to get started with.

One thing I’ve seen is that people get fixated on one app or tool. Sure, you might be able to use Keyboard Maestro as a text expansion app, but TextExpander does it better and is easier to use as well. Launchbar can open apps, but so can BetterTouchTool; they just do it differently. Even the built-in AppleScript and Automator have their uses. 

Mixing and matching the different tools is the best way to really customise a Mac. It also means that you’re not limited to just one tool. All the different automation apps can be combined in different ways. They can complement each other. 

In this tutorial I’ll outline different ways you can combine different automation apps. You should take these as a jumping off point, rather than something that’s set in stone. Feel free to sub in one app for another. 

At this point, I’m assuming you’ve got a pretty complete knowledge of most of the Mac automation apps available. If not, check out my tutorial on How to Choose the Right Tools to Automate the Mac. It introduces most of the apps I’m going to cover and links out to a load of great tutorials where you can learn more.

Use BetterTouchTool to Trigger Keyboard Maestro

BetterTouchTool is great for triggering different things. You can use an app, keyboard shortcuts, mouse movements, or my favourite, trackpad gestures

With a Mac’s multi-touch track-pad, there are far more than just one or two finger scrolls on offer. There are hundreds of possible combinations of fingers, modifier keys, taps and swipes. These sort of physical movements are very quick to perform and easy to remember. 

Keyboard Maestro is the most powerful Mac automation app going. There is very little you can’t do with it. I’ve got Macros that do everything from automate image uploading and insert them at the correct spots in my articles to opening all the apps I use to work and closing down any that distract me. 

The one area that KeyboardMaestro falls down in is triggers. Hot Keys are great, but you can only have so many keyboard shortcuts to remember and the Palettes set up is kind of ugly. By mixing in BetterTouchTool, however, you can overcome this. 

I’ll create a BetterTouchTool gesture that triggers a Keyboard Maestro Macro. I’ll start in Keyboard Maestro. Below is a Macro that gets me ready to start working. It closes down distracting apps, launches Ulysses and Safari, and starts a Pomodoro timer.

start work macro
The Start Work Macro.

Right now it doesn’t have a trigger and what I want to do is use a BetterTouchTool gesture. I’ll create a little workaround. I’m going to use really complex keyboard shortcut that I’ll never actually have to press: Command-Control-Option-Shift-=

The trigger
The complicated hot key for it.

That will do nicely! I’ll open BetterTouchTool and create a new Global gesture. I’ve gone with a 4 Finger Swipe Up.

new gesture
A new BetterTouchTool gesture.

To make it so that this gesture triggers Keyboard Maestro, all I have to do is set it to trigger Command-Control-Option-Shift-=.

the trigger
The gesture mapped to the Hot Key.

And just like that, a four finger swipe up on the track-pad causes a whole lot to happen. 

Use TextExpander Snippets in Keyboard Maestro Macros

While there’s nothing you can do in TextExpander that you can’t do with Keyboard Maestro, TextExpander makes it a lot easier. If you want to spend a dozen hours fine tuning Macros, feel free. For me, when it comes to text expansion I’m going to stick with TextExpander.

What TextExpander doesn’t do well, however, is control applications. It can do some simple key presses but that’s about it. 

See what happens if I combine the two.

Here’s a Snippet that fills in a form rejection letter, to the generic PR pitches I get, in TextExpander

pitch response
My PR pitch response.

It’s great to have, but to send it, I have to actually hit reply to the email, enter the abbreviation, and then hit send. 

Below is a Keyboard Maestro macro that takes care of all that for me. 

macro
A macro that responds automatically.

When I press the keyboard shortcut Command-Shift-R in Airmail, my email app, it automatically creates a new reply, triggers the TextExpander Snippet and then sends the email.

Obviously you could get a lot more complex and make use of TextExpander’s deeper features like customised inputs and JavaScript. This is just a simple example to show the general principles.

Trigger Keyboard Maestro When a Hazel Rule Runs

Hazel is an amazing file management app. It can move and manipulate any files on a Mac. I use it to keep everything organised. It doesn’t, however, have any of the general uses that some of the other apps have. Here’s how to give it some.

Imagine you have a situation where you’ve got a shared Dropbox folder with a client. Whenever they add a new file to it, you want to get notified. 

I’ll start with KeyboardMaestro. Below is a Macro that opens Airmail and sends me an email saying that there’s a new file. The pauses are to make sure the Macro doesn’t hang. You’ll also notice that my email address is filled by a TextExpander Snippet. The trigger is Command-Control-Option-Shift-N.

email macro
The Macro that automates the new email.

Jump into Hazel. I’ve set up a rule on the Client Folder so that some AppleScript is going to run whenever a new file is added. 

new rule
The new rule.

Have a look at that AppleScript.

the applescript
The AppleScript that sends a keyboard shortcut.

What this tells the system to do is trigger the keyboard shortcut Command-Control-Option-Shift-N… which sends me the email notification. 

Again, this is only a simple example. Keyboard Maestro has the power to do a lot more than drop me an email. The only limit is your imagination. 

Wrapping Up

By combining different automation apps you can really take total control of a Mac. What one app lacks in one area, another can make up. 

I’ve relied heavily on Keyboard Maestro in these examples but only because it is the app I’m most familiar with. Use whichever apps you want.