Quick TinyURLs with TextExpander and AppleScript
Posted by JeanI just came across this neat tip on developer David Smalley’s blog. It uses AppleScript to generate a tinyURL with a TextExpander abbreviation.
(If you’re not familiar with Tiny URL, it’s an online service that converts long URLs into short ones more appropriate to share in email and microblogs.)
I am no AppleScript maven, but it sounded pretty cool. I’ve been using Tiny URL a lot lately since I started using Twitter. So I consulted Greg, whose works on TextExpander development, to see what he thought. His response:
This does work, and it’s quite convenient. Here’s an easy way for you to import this:
And he sent me the AppleScript wrapped in a TextExpander Group. You can download it here:
http://www.smileonmymac.com/textexpander/tinyurl.textexpander.zip
Download and unzip it, and then add the group in the TextExpander preferences pane.
Then you’re set to follow Greg’s instructions:
You select a URL, copy it to the Clipboard, then type “tinyurl” (and your delimiter if you’re not doing instant expansion) then wait a few seconds and “tinyurl” will be replaced by a tiny URL.
If you’re a real geek, you can grab the AppleScript from the original blog post and create your own AppleScript snippet in TextExpander.
March 27th, 2008 at 12:37 am
Fantastic! Just got a Mac, and have been using Autohotkey on the PC before. I miss some features in TE, but this was a really, really nice tips. Gave me inspiration to create other applescript based replacements
Thanks!
March 27th, 2008 at 12:15 pm
@ Henrik: Great! If you create any Applescripts you want to share, send me an email (jean@smileonmymac.com). If we post your tip on the blog, we’ll give you a license to one of our other products as our thanks.
April 4th, 2008 at 10:36 pm
This was a great start. I’ve added a little error checking and a faster call to the core TinyURL API here: http://jdstrong.com/textexpander_tinyurl_applescript