After some digging around, I found this thread in Apple’s Support Forum which identifies the problem and gives several solutions. The best solution is given by Annapolitan and involves replacing this line from Justin’s code
It works great. Following Justin’s lead, I configured FastScripts to execute the script when I hit ⌘-b.
Here’s my completed code. You can modify the
set post lines to build out your template as needed.
tell application “Safari”
set pageURI to (get URL of document 1)
property LF : ASCII character 10
tell application “TextMate”
set post to “” & LF & LF
set post to post & “[” & pageTitle & “]”
set post to post & “(“ & pageURI & “)” & LF & LF
set post to post & “> “ & selectedText & LF