The Mac Observer

Skip navigational links

You're viewing an article in TMO's historic archive vault. Here, we've preserved the comments and how the site looked along with the article. Use this link to view the article on our current site:
Instant TinyURLs from TextExpander

TMO Quick Tip - Instant TinyURLs from TextExpander

by , 7:30 AM EDT, March 21st, 2008

TinyURL is really great because it shrinks long Web addresses down to a much smaller and more manageable size, but it usually takes several steps to get those compressed URLs. With a little help from AppleScript and TextExpander, however, you can cut that process down to just a couple of steps.


The TinyURL Web site.

First, you'll need TextExpander 2. This app expands abbreviations that you define into words or text blocks, and it can also run AppleScripts. It costs US$29.95 and you can download it from the SmileOnMyMac Web site.

You'll also need David Smalley's cool AppleScript that converts any URL you copy into a TinyURL. If you don't feel comfortable mucking around with AppleScripts, SmileOnMyMac has a version you can download and import directly into TextExpander.

Once you have all of the pieces, here's what to do -- assuming you are using SmileOnMyMac's pre-built script:

  • Double-click the file you downloaded from the SmileOnMyMac Web site. It should automatically expand and leave you with a file named tinyurl.textexpander.

  • Open TextExpander's preferences.
  • Launch TextExpander. You can either choose TextExpander Preferences from the TextExpander menu bar item, or launch System Preferences and click on the TextExpander Preference Pane icon.

  • Adding the AppleScript to your snippets.
  • Now click the plus button in the lower left corner of the Preference Pane and choose Add Group from File.
  • Navigate to and select the tinyurl.textexpander.

Here's how to use your new TextExpander script:

  • Select and copy a URL you want converted into a TinyURL.
  • Place your cursor where you want the TinyURL to appear.
  • Type tinyurl -- which is the pre-assigned abbreviation for the AppleScript that generates the TinyURL for you.
  • The TinyURL version of the Web address will automatically appear at your cursor insert point.

I find this little AppleScript to be stunningly useful and a great time saver, especially when the number of characters or how much you can type is strictly limited. Yes, I'm thinking Twitter, but you can use this trick in other applications, too.

[Thanks to Jean at SmileOnMyMac for turning me on to this great AppleScript.]


Jeff Gamet is TMO's Morning Editor and Reviews Editor. He lectures, teaches and speaks on Mac OS X and design-related topics, and is the author of The Designer's Guide to Mac OS X from Peachpit Press.

if you have tips or tricks to share, or Mac-related questions you want answered.

Recent TMO Headlines - Updated September 19th

Tue, 1:03 PM
tvOS 11 for Apple TV 4 Ready for Download
Tue, 1:03 PM
Apple Rolls Out watchOS 4 for Apple Watch
Tue, 1:01 PM
Apple Releases iOS 11 for iPhone, iPad, and iPod touch
Tue, 11:25 AM
Pi Plans to Make the iPhone's Wireless Charging Contactless
Tue, 9:01 AM
macOS: Setting Up Custom Reminders
Mon, 6:32 PM
5 Wireless Charging Pads for Your iPhone 8 and iPhone X
Mon, 6:26 PM
Robots Won't Supplant Human Workers After All
Mon, 6:13 PM
CCleaner Malware Found In Version 5.3 of Software
Mon, 6:13 PM
TMO Background Mode Interview with The Mac Observer's Contributing Editor John Kheit
Mon, 5:42 PM
Apple Premiering Clive Davis: The Soundtrack of Our Lives on Apple Music on October 3
Mon, 5:16 PM
Add Custom Ringtones to Your iPhone in iTunes 12.7
Mon, 5:07 PM
PCalc Uses ARKit for the Best App About Screen Ever
  • __________
  • Buy Stuff, Support TMO!
  • Podcast: Mac Geek Gab
  • Podcast: Apple Weekly Report
  • TMO on Twitter!