View Single Post
Good solution.

One could assign a keystroke to an analogous applescript.

A variant which uses HTML (for those of us who are not native RTF speakers):

Code:
set {strURL, strTitle} to {"", ""}

set strURL to text returned of (display dialog "Enter a URL:" default answer "http://" with title "Make Link")
set strTitle to text returned of (display dialog "Enter a title for the link:" default answer strURL with title "Make Link")

if (strURL is not "") and (strTitle is not "") then
	set strHTML to quoted form of ("<font face=\"helvetica\"><a href=\"" & strURL & "\">" & strTitle & "</a></font>")
	do shell script "echo " & strHTML & "  | textutil -format html -convert rtf -stdin -stdout | pbcopy -Prefer rtf"
end if
But, I am still finding that links made this way cease to work after the file has been saved, closed and reopened ...
(tho they work fine when first created)

(I have filed a bug under Help > Send Feedback ... )

--

Last edited by RobTrew; 2010-11-01 at 11:04 AM.. Reason: Added simple specification of font face