Getting the link for an Apple Mail Message

This post by David Sparks aka MacSparky from a couple of days ago provides an Apple Script that he uses to get links to Apple Mail messages anywhere using TextExpander.

It’s easy to understand and there’s also a video that shows you how and why you would want to use it.

After reading the post and watching the video I decided that this would be something that I would use. Only one problem. I don’t use TextExpander. So after thinking about it for a few minutes, I figured I could accomplish the same thing using a Keyboard Maestro macro.

Here’s the macro:

This Keyboard Maestro macro works the same way as David’s TextExpander snippet. Now type “;elink” in any app that can take a URL and you create a link to the currently selected email message. I’m primarily using it in Things 3 and Bear.

Here’s the AppleScript if you want to copy and paste it:

(*
  Returns a link to the first selected Apple Mail message
*)
tell application "Mail"
  set _msgs to selected messages of message viewer 0
  if (_msgs is not equal to missing value) then
    set _msg to first item of _msgs
    set _msgID to do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & (message id of _msg)

    return "message://%3C" & (_msgID) & "%3E"
  end if
end tell

 

Modifier key order

I’ve learned a lot about the Mac from following Dr. Drang’s blog. A lot of what he talks about is over my head but some I’m able to pick up on and use in my daily workflow.

Did you know that there’s a proper order for stating the modifier keys in a keyboard shortcut? I didn’t. But I do now.

Dr. Drang explains the the proper modifier key order in stating a keyboard shortcut:

Control (⌃), Option (⌥), and Command (⌘) always go in that order. The oddball is the Shift(⇧) key, which sneaks in just in front of Command.

If you write about Mac keyboard shortcuts, as I did yesterday, you should know how to do it right. Just as there’s a proper order for adjectives in English, there’s a proper order for listing the modifier keys in a shortcut.

The order is similar to how you see them down at the bottom left of your keyboard.

The last bit of standard syntax is that the letter key in the shortcut (if there is a letter) is always presented as a capital, even when the Shift key isn’t used.

​When entering a keyboard shortcut, you’re not typing a letter, you’re pressing a set of physical keys on the keyboard in front of you. The symbols on the letter keys are capitals, so that’s the appropriate way to identify those keys.

iPad – Can it replace my Mac update

I switched to Apple products about 4 years ago. My first device was an iPhone 6 that replaced an LG Android phone. Shortly thereafter I replaced my ailing Windows PC with a late 2013 21” iMac. Next came my early 2015 13” Retina MacBook Pro. And I recently upgraded my iPhone to a 7 Plus. With this setup, I never felt the need for an iPad. In fact, I recently wrote an article Can iPad replace my laptop.

So here’s how I’ve ended up with an iPad. Several months ago a friend gave me a B&H gift card that I had actually forgotten about. After rummaging through some stuff the other day I ran across it and realized it was going to expire on October 30 which was only a few days away. Not knowing what to get I decided on an iPad. So I placed an order for a 2017 iPad 9.7” with Retina display and 128 GB storage.

I’ve been using it now for a few of days. The setup was pretty straightforward. I installed all the apps that I want on it and purchased a Speck Slim Balance Folio case for it.

Now how does this iPad fit in with my iPhone and Macs? My computing needs are pretty simple. I write, read, browse the web and manage my finances. Knowing what I do, I am sure I wouldn’t want to completely switch to an iPad. So far I like the reading and web browsing experience on the iPad is. It’s lightweight making it easier to handle than my MacBook and easier to read on than my iPhone.

Writing is not so great. My writing workflows include apps like Keyboard Maestro, Alfred, PopClip, and Marked 2 that improve my productivity. There are no apps like this for iPad. I have to jump through too many hoops to do the same things (if at all) I can do on my Mac.

Here’s the bottom line. I like having an iPad but I certainly don’t need one.

Now you can exclude apps from clipboard history in Keyboard Maestro 8

One complaint I have with Keyboard Maestro is the way passwords are handled in the clipboard history.

Clipboard entries that resemble passwords are obscured, deleted after they reach position ten in the clipboard history, and not saved to disk. You can option click on an obscured password to reveal it.

This way of handling passwords has always made me uncomfortable. I’m used to being able to exclude apps like you can in Alfred or Copied.

Now with Keyboard Maestro 8, you can exclude applications using the Keyboard Maestro Excluded Preferences. I added 1Password to the excluded list. Now when I copy a password it will no longer be stored in the clipboard history.

Thank you Peter.

How to show the PopClip menu on a selection

PopClip is one of my favorite Mac utilities.

PopClip is a Mac utility for working with selected text. When I highlight text with my mouse or trackpad an actions menu pops up with options to do something with the text. I don’t have to right-click, it just appears automatically. And if I don’t use it, it’ll disappear when I move my mouse.

PopClip includes standard actions like copy, cut, paste, and delete. There are also extensions to get the highlighted text into some of my favorite apps. Another action I frequently use is taking highlighted text and converting it to markdown. There are over 100 extensions that can be downloaded from the PopClip download site.

The only problem with PopClip is that occasionally the menu doesn’t appear when I make a selection or I’ll sometimes accidentally dismiss it. When this happens I have to re-select the text to get the menu back again. That’s a pain. Thanks to Brett Terpstra there’s a simple script to get the menu to appear. To solve this problem, I’ve set the script to a Keyboard Maestro hotkey trigger ⌥⇧P so I can get the menu to appear anytime I want.

Here’s the Keyboard Maestro macro:

Quickly quit all open applications at once on your Mac – Keyboard Maestro

As a rule, I usually have quite a few apps and windows open on my Mac and I switch back and forth between them through out the day. When I was ready to shut my Mac down for the day I would have to close each of these apps and windows individually. I thought to myself, there has to be an easier way.

I like to automate repetitive tasks as often as possible. To solve this problem I launched Keyboard Maestro and created a macro to exit all open apps and windows using a keyboard shortcut. Here’s the simple macro I use for this.

That’s it! Now every time I type the keyboard shortcut, all open windows and applications close.

If you have Alfred with the Powerpack you can do the same with a workflow which you can download here.

Open Safari URL in Chrome – Keyboard Maestro

Safari is my main browser. From time to time I come across a website that doesn’t play well with Safari. When this happens I open the site in Chrome. To do this I have to copy the URL from Safari -> launch Chrome -> and paste the URL into Chrome. To many steps. To simplify this, I have a Keyboard Maestro macro to automate the steps with the hotkey ⌃⌘G.

Here’s how to create the macro: