Posted By

Todd on 04/03/09


Tagged

url urls shorten bitly textexpander


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

liamr
kenton
sheedy


bit.ly URL-shortening script for TextExpander that associates URLs with your bit.ly account


 / Published in: ActionScript 3
 

TextExpander is a great Mac tool that expands special abbreviations typed anywhere in the OS into useful snippets of text. One of the AppleScript snippets included shortens a URL in the clipboard using the bit.ly URL-shortening service. You copy the URL from your browser and just type /bitly in an email, IM, or Twitter, for example, and the abbreviation is replaced by a shortened URL.

One advantage of bit.ly over other shortening services is that it provides click statistics and other useful information for each shortened URL. If you have a (free) bit.ly account, the URLs you shorten are easily accessed through their site. However, the script included with TextExpander shortens the URL without associating it with your bit.ly account. This version of the script is a very simple modification which associates URLs you shorten with your bit.ly account.

To use this script, change [your_username] and [your_API_key] in line 9 to the correct values. (Once you have created a bit.ly account, you can find your API key here: http://bit.ly/app/developers.) Create a new snippet in TextExpander and paste the script into the Content field, making sure to select AppleScript in the dropdown above the field. Set the abbreviation and you're done.

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: nick108 on September 13, 2010

Just tested with TextExpaner 3.1.2, but although I set content to AppleScript it does not return the bit.ly URL, but the complete snippet code instead. I tried restarting TextExpander to no avail.

Posted By: nick108 on September 14, 2010

Running the snippet in AppleScript code editor returns

"The command exited with a non-zero status." number 3

You need to login to post a comment.