Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Shawzborne

macrumors 6502a
Original poster
Jun 12, 2013
701
67
Hi Guys,

Im looking for something that can auto-shorten any urls that are detected in the mac clipboard and then be able to paste the link anywhere on the mac just by using default paste command.

Thank-you,

Shawn
 
Not exactly what you wanted, but this Applescript will take the frontmost Safari tab URL and shorten it, then paste it in the clipboard.

You could use Applescript Editor to save this as an app if you like then run it from the Dock or Spotlight.

Code:
tell application "Safari"
	set longURL to URL of front document
end tell

set shellScript to ("curl --url \"http://tinyurl.com/api-create.php?url=" & longURL & "\" ")

set shortURL to (do shell script shellScript)

set the clipboard to shortURL
 
The best way for this if anyone wants to know is download short menu in the Mac app store
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.