Planning your Keyboard Maestro macros and Text Expander Snippets

Difficulty Level: Advanced

Here’s a tip to take your Keyboard Maestro macros and Text Expander Snippets to the next level of productivity. With all the changes made to OS X and Apple’s programs, I find it best to plan your macros and snippets properly. One never knows what changes will come, so with a little extra work, you can safeguard your work from future changes.

The best solution is to break down your macros and snippets into smaller ones. For example:

Scenario 1:

Here’s an address snippet:

  • Mr. First Last
  • 123 Any Street
  • Anytown, Country
  • Postal Code

Scenario 2:

  • ,,name
  • ,,addressHome
  • ,,CityHome
  • ,,PostalHome

I prefer Scenario 2 because if I ever have to change one line, I can do so by changing the snippet for that specific line rather than having to change the snippet in Scenario 1 and any other snippet that may have that same line. It really comes in handy when you use snippets in many different places.

The same applies to Keyboard Maestro, perhaps more so.

I have macros that apply formatting to text. I give it its own macro and call upon it by using the ‘Trigger Macro by Name’ macro. If, for whatever reason, I need to change the formatting, I can do so from one location rather than every single macro that contains it. This form of compartmentalizing makes changing things so much easier in the long run and will save you many headaches later. Especially when Apple decides to make some smaller changes.

The drawback is you will create a massive list of macros; organizing and finding them later will be a challenge. What I do is have a different Group for these subordinate macros and snippets and name them something like ‘<blank>Helpers’. I use a descriptive name to make finding them later pretty easy.

Try it out. I’m sure it will save you time later. Have fun.


Get a URL while you type with Keyboard Maestro

Difficulty: Basic

Don’t you hate having to switch between your text editor and your web browser to get a URL? Although the process is straightforward, it’s annoying and boring.

  • switch applications
  • highlight the URL
  • copy
  • switch back to your text editor
  • paste

Here’s a Keyboard Maestro macro that makes the entire process simple and fun and it will work from any text editor.

Get a URL super quick
Get a URL super quick

I used Safari for this, but you can use whatever browser you like as long as you know the keyboard shortcut to highlight the URL bar.

  1. While you type, press the keyboard shortcut you created
  2. The macro will open Safari
  3. I placed a pause here in case your computer is slow
  4. ⌘L will highlight the URL bar
  5. ⌘C to copy it
  6. Activate Last Application will activate the last application you were using, i.e., your text editor
  7. ⌘V to paste

Easy! I hope you find it useful.

File Important Notes Quickly With Keyboard Maestro

Difficulty: Normal

Have you ever been working and wanted to remember something for later, but found switching applications tedious?

Here’s a fun Keyboard Maestro script that allows you to highlight text anywhere and have it saved to the file of your choosing for later processing. Your computer will speak to you and tell you the process is complete!

I started this macro with a User Prompt. It asks the user to choose which file you’d like to save the text to. Of course, you need to create these files, store them in one place. If you ever move them, you’ll have to change the path in your script.

Append Text to Chosen File
Append Text to Chosen File

You can create as many files as you want or you can skip this step entirely if you plan to save all your text to the same file.

Sorting Where the Text Will Be Saved
Sorting Where the Text Will Be Saved

Since I have placed a drop down menu in the user prompt, we will need an If Then Macro to sort the 2 options. If the user has chosen the ‘Notes’ file, then we proceed with this action:

  1. If the variable, ‘Choose File’ (created in the User Prompt) contains ‘Notes’, then store the highlighted text to a Clipboard I created named ‘Temporary’.
  2. Use the ‘Append Text to File’ macro,  and in the text area, simply add a return carriage by hitting the return key. This will ensure the highlighted text gets placed on its own line. Before moving on, make sure you choose the correct file path from the file path chooser.
  3. Use the ‘Append Named Clipboard ‘Temporary’ to File’ macro, choosing your file path once again.

There are some settings here; feel free to make any adjustments to your text. I prefer plain text for its portability.

Confirming the Text Was Saved
Confirming the Text Was Saved

Lastly, we have three macros to confirm it executed properly.

  1. We quit TextEdit (or whatever application you prefer) if it is open.
  2. The computer will now speak the words: “Text was appended to your Notes files”.
  3. Finally, we reopen TextEdit and the Notes file and see the result. You can remove this step once you see for yourself that indeed it worked for you. Note: we must close the file and reopen in order to see the results. The changes do not dynamically update themselves live. Although the changes were made, a refresh of the file will allow you to see them.

Lastly, we repeat the same steps again, and place them into the ‘otherwise execute the following options:’, or the ‘Else’ section of the Else If script step. However this time, you make a few small changes:

  • change the file path to the To Dos file you created
  • change the message the computer speaks from ‘Notes’ to ‘To Do’

Variations: As already mentioned, you can skip the whole If Then step, simplifying the process, but all your text goes to the same file. You could then duplicate this macro, change the file path and direct your text elsewhere; one keyboard shortcut for every file. You could also add a radio button to the User Prompt, asking whether this information is deemed important. Then you could add an If Then script step to apply a series of asterisks before the text is placed, in an effort to emphasize your notes later.

I hope you find this as useful as I do. With the addition of the ‘Speak Text’ macro, working on my Mac became even more fun.


An If Then Else Macro with Keyboard Maestro

Difficulty: Normal

Do you find data entry as annoying and boring as I do? It doesn’t have to be that way. Try this Keyboard Maestro script to make those simple boring tasks more manageable and perhaps even fun.

Of course, you could apply this to any context, but I chose to use the example of entering a client’s contact information into a Pages document. (Actually, I prefer Apple’s Text Edit or any third party app capable of plain text editing, but that’s a topic for another post)

Although this isn’t a complicated script to write, there a many places where things can go wrong. I find this script is a springboard to bigger and better things. It incorporates an essential step, the If Then Else script step, which when mastered, can take your productivity as far as you want.

Let’s start with the User Prompt:

Setting Up the User Prompt
Setting Up the User Prompt

As always, you can tailor this to your needs: exercise routines, diet results, client info, DVD library, etc. You can get clarity on the Paid Status value here on a previous post.

The next step. You have the data, now you open your preferred text editor. I place pauses immediately after the computer needs to do some work or animation; we want the computer to finish this step before our next step triggers, so it’s important you get this right. Too long is better than too short a time span. Once it’s working perfectly, you can always fine tune the timing later.

In this example, I open Apple’s Pages app, use a keyboard shortcut to open a new file, and use the return keystroke to simulate clicking OK. This works fine for Pages, it may be too much for other text editors. In other words, you’ll need to make it fit:

Pages Related Macros

The next step is the data entry. Do not get intimidated here. You do not need to know this code-looking syntax. I enter the text ‘First Name: ‘ then click the disclosure triangle next to ‘Insert Token’, above the text box to the right. There you can hover over the first item on the list, ‘Variable’ and find the variables you named in the first step there. It will automatically insert this ‘code’ for you.

As a side note: I have so many variables, I sometimes click the wrong variable. Double check you’ve chosen the right one.

Then comes the If Then Else Script step. It’s actually very easy. The hardest part is deciding on the trigger. In this example, I use the value of ‘Paid Status’: if ‘Paid Status’ is true, do this… and if Paid Status is false, then do this…

Entering Text Macro


If everything went well, when you press your keyboard shortcut to activate this script, you should see the following:


empty user prompt
empty user prompt

Enter some text:

with the prompt filled out
with the prompt filled out

Then watch Keyboard Maestro‘s magic wand do it’s work!

What it should look like
What it should look like

Those most common misstep for me, other than the ones I mentioned, is proper formatting: sometimes there’s a carriage return or a space missing or a return where one isn’t needed. These are minor details. The most common problem I have is managing the pause length, but with a simple script like this, you shouldn’t have any problems.

Other options you can try:

  • take out the steps that open an app and trigger the script when you’re already in your preferred app
  • add more complicated variables
  • add calculations
  • create sentences with the user input and then print that to your document
  • this list is limitless

Have fun with this. I hope you create same really productive scripts.


Changes in Mavericks

Mac OS X Mavericks has changed my workflows. Although I’ve had the opportunity to work with Mavericks for quite some time, I now have the final, fully functional, polished version that was made available yesterday to all users for free. (nice!)

I haven’t had a chance to notice everything yet, but the first thing I did notice is its very tight integration with iOS 7. Apple seems to be moving in this direction. All their platforms, regardless of device have a more familiar feel, which is good. If things continue on this path, it shouldn’t be long before they all look almost identical.

The mobile devices, namely the iPad, iPhone, and iPod, that are running iOS 7, are getting more powerful. This capability will help with Apple’s grand plan of integrating everything seamlessly.

Anyway, I look forward to playing with iPhoto on the Mac’s integration with iOS 7. Being able to take a picture on my iPhone and have it sent to my Mac at the office within seconds can become very useful. Before Mavericks, I had a workaround. I had an If This Then That recipe that would forward all my iOS 7 photos to my Dropbox account. It worked fine, but there was sometimes a longer delay than I had expected. Nonetheless, it worked fine.

Sometimes I share portfolios with clients using Dropbox, and have Hazel delete the folder after a predetermined amount of time, freeing up space. I’m not sure yet if this is something Mavericks with iCloud will be able to handle. I will keep you posted.

iOS 7 Level Comes in Handy

Have you ever needed a level but you didn’t have one handy?

It happened to me. I had to hang a picture frame on my wall and I didn’t have a small enough level. iPhone to the rescue…

iOS 7 ships with a compass app. Open Compass, swipe to the left, and you have an accurate level:

almost level
iOS 7 Compass app – almost level

With a little adjustment, you should aim for this:

iOS 7 Compass app – level

The great thing is, it figures out if it’s being used sideways or flat and adjusts accordingly. I stumbled on it by accident and now I find myself using it a couple times a week… now if only it displayed degrees to 2 decimal places (or at least 1)… I could use it at my job sites. Until then, it’s fine for around the house.

Very handy; enjoy.


Adding a Yes or No Checkbox with Keyboard Maestro

Difficulty Level: Easy

Have you ever wondered how to add a checkbox in Keyboard Maestro? Although it’s not apparent, it’s extremely easy.

With all the incredible features Keyboard Maestro has, implementing user input has brought my scripts and macros to an entirely new level.

Here’s how to do it:

2 ways to perform a yes or no
2 ways to perform a yes or no

The first option will create a checkbox. It works with a 0 as false and a 1 as true with | (found above your ENTER key, and known as the pipe symbol) as the separator. Another way to look at it is this:

  • 0 is equal to false and also equal to box unchecked, or
  • 1 is equal to true and also equal to box checked

The second will create a dropdown menu with the 2 values also separated by the | symbol. In this case you have Yes and No.

These values are stored in their respective variables. In this case, I have named them: ‘Yes’ and ‘Yes or No’, but you can call them anything you like.

Yes or No dialog box using Keyboard Maestro
Yes or No dialog box using Keyboard Maestro

Of course, these 2 options by themselves are almost useless. Adding a conditional Action like an ‘If Then Else’ after the ‘Prompt for User Input’ will make this extremely useful.

Have fun with this.

Is the Moleskine Evernote Edition any good?

I just received my new Moleskine Evernote Edition in the mail today. I’ve been using Moleskine notebooks for years and have been looking forward to this item for a while now.

Here’s what it looks like:

Moleskine Evernote Edition
Moleskine Evernote Edition

Scribbling notes is as easy as any other notebook. From the iOS Evernote app, you can capture the page and store it in our Evernote account. You can even add little stickers (provided by Evernote, which are tucked away in the back folder) to each page which tells Evernote which folder you want your page to be stored into — that’s very cool.

Here’s what a document capture looks like within the new iOS 7 Evernote app:

Evernote iOS app document capture
Evernote iOS app document capture

The pages are supposed to be designed to allow better screen captures. As you can see, it does a good job. Then Evernote uses its OCR technology to scan the page so you can search your notes by keyword. That’s the best part: you scan your pages and never worry about having to file anything in the right place because as long as you remember something from it, Evernote will find it. As convenience goes, I give it top marks.



Are Solid State Drives Worth It?

Is it worth going to all the trouble of installing a Solid State Drive?

Absolutely! I recently switched to an SSD: it is like a brand new computer. It loads faster, it boots faster… it’s just so much better.

There are plenty of videos and tutorials on the web to show you how to do it. This post is only about whether you should do it. Again, yes, do it.

The Details:

Brand Name: Crucial

Model: M500 480GB SATA 2.5

What I installed it on: 2013 MacBook Pro

Difficulty Level: Much easier than I expected

My advice:

Before you buy the SSD, make sure you can handle the installation on the computer you have. For example:  on a late 2012 iMac, it is a major pain to perform this installation with many potential problems. Of course, you could hire a professional to do it for you if you’re not confidant enough in your skills. Research the process first, before you buy.

Fast Calculations with Keyboard Maestro

Difficulty Level: Basic

When I’m on the field taking notes, I use Apple’s Notes app on my iPhone 5. iCloud keeps my data on the phone and on the Mac in sync. It’s easy; it’s convenient. But it’s certainly not the prettiest.

But this post isn’t about note taking. It’s about accuracy and convenience. Often, I have many calculations to make. I’ve made mistakes in the past. Now, I still make mistakes, but not with my calculations.

Here’s what I used to do:

  • use the iPhone to take my notes on site
  • go to the office and open Notes on the Mac
  • with Notes open on the Mac, open the calculator on the iPhone
  • hope I tapped all the numbers correctly, get the value, and type them into the Notes app on the Mac

Very slow, boring and error-prone…

Here’s what I do now:

  • use the iPhone to take my notes on site
  • go to the office and open Notes on the Mac
  • highlight the calculation and hit a keyboard shortcut, and voilà, done!

Much faster, 100% accurate and fun…

Here’s how to do it:

Using Keyboard Maestro, you can call your macro whatever you prefer. For the hot key, I use the letter M because it’s short for Math. Whatever works to help you remember…

Keyboard Maestro Perform Calculation Script

For example, let’s say the calculation (the highlighted text) is:  239*57

  1. copy the highlighted text onto the system clipboard
  2. choose Filter Clipboard with Calculate, then Filter System Clipboard, with Calculate, which will simply calculate the highlighted text
  3. I type the Right Arrow which simply unhighlights the text and goes to the end of the text, ready for…
  4. the Return key, which sends it to the next line
  5. finally, I paste. The answer is already stored in the System Clipboard, so performing a routine paste will spit out the answer: 13623

You can easily modify steps 3-5 to your needs. You may not want to keep the original calculation; you may only need the answer. Tailor it to your needs. Apply formatting! Whatever you need. The end result will be accurate and fun to perform.