Activate pasted Links


I have a few routines (sample below) that will create links to documents, web pages etc that I will then paste into Apple Notes or a Devonthink RTF file.

The Links work fine but to activate them in the destination document I have to place the cursor at the end of the link and press enter.

is there a way to simulate this process in Applescript or actually make them active on pasting?

Thanks for any assistance


Screenshot of inactive and active links

tell application "Safari"
set docText to ""
set windowCount to count (every window where visible is true)
repeat with x from 1 to windowCount
	set tabCount to number of tabs in window x
	repeat with y from 1 to tabCount
		set tabName to name of tab y of window x
		set tabURL to URL of tab y of window x as string
		set docText to docText & tabName & " – " & tabURL & return & return as string
	end repeat
	set the clipboard to the docText
end repeat
end tell

If I were doing this I would use appleScript to write directly to the RTF file. It can be a bit tricky to get the tags right, but definitely doable.

Another option would be to open the RTF file in a scriptable application, and add it there.

1 Like


Thanks for the suggestion.

I actually do have a routine where the link or snippet&link are written directly to a Devonthink RTF file but the link is not active on creation. To activate it you have to place the cursor at the end of the link and press return. Only a minor issue bit it is annoying.

Interestingly there are apps where the pasted link is recognised immediately (eg Things3, Reminders) but not the 2 I most want Devonthink and Notes.