Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Keyboard Maestro: 8 unexpected uses for the old-school Mac-hacking tool

Anders Lundberg | Sept. 24, 2014
OS X includes all kinds of tools to help speed up your Mac's workflow--scripting, keyboard shortcuts, and Automator among them. But the venerable utility Keyboard Maestro can be more useful, in more different ways, than any of those built-in tools.

The trick here is that, because Superduper! can't be scripted, your macro has to include simulated button presses. It also needs a couple of short pauses to let the system first mount the drive and then make sure Superduper! is launched. The macro action flow could go like this:

When the USB device named name of your external drive is attached: Pause for two seconds; open Superduper!; pause another two seconds; activate Superduper!; press the Copy Now button; press the Copy button.

Autosave in Microsoft Word

(This tip originally came from TJ Luoma on The Unofficial Apple Weblog; I modified it a bit, to make it less annoying if you've just started working on a new document.)

While Microsoft Word remains a standard app in offices around the world, it surprisingly lacks even basic autosave and it does not support OS X's versioning system. If you've ever experienced that sinking feeling when Word crashes and you hadn't saved your document for a long time, when the recovery feature doesn't work and you've just lost hours of work, this macro is for you.

Make a new macro in the Global group. Now add two Application triggers: First, that Microsoft Word is active; set that one to repeat every minute or so. Set a second trigger to when Microsoft Word deactivates. This causes the macro to save your open Word doc whenever you switch to another application.

Then add the action Execute, then Execute an Applescript. Copy the following script code into the text field that appears:

tell application "Microsoft Word" if it is running and name of active document does not contain "Document" then save active document end if end tell

This tells Word to first check that it is running and that the name of the active document (the frontmost open document) doesn't include the word Document; if those two conditions are met, then the macro saves the active document. That second condition is there so the macro doesn't trigger when you're working in a new, unsaved document; without it, you wouldn't be able to switch away from Word until you've saved the document.

Automatically connect VPN on insecure networks

If you care about your privacy, you should consider using a VPN service when connecting to the Internet from an open or semi-open wireless network, such as those you find in coffee shops and airports. You can use Keyboard Maestro to automatically connect your VPN whenever you're on an insecure network.

Make a new macro under the Global group and pick Wireless Network Trigger. Pick Any Wireless Network from the first drop-down and Is Connected from the second so that the script will test every network you connect to.


Previous Page  1  2  3  4  5  6  Next Page 

Sign up for Computerworld eNewsletters.