Archive for August 9th, 2008

Create HTML link from Safari Tab

My second script has been completed, this one actually works.

tell application "Safari"
	set currentTab to current tab of window 1
	set tabName to name of currentTab
	set tabURL to URL of currentTab
	set the clipboard to ("<a href=" & tabURL as text) & ">" & tabName & ""
end tell

There are message boards that I post on that don’t autoformat URLs as links, so I’ve always had to manually add the “<a href=” tags. This scrip just pulls in the title and URL of the current tab and copies the HTML link to the clipboard. I set the badboy up as a hotkey in Quicksilver and BOOM, I have done it.