open x-devonthink-item links in main window

Thanks. I modified one of the default AppleScripts to copy the item link of the selected item + “?reveal=1” to the clipboard. I added it as a toolbar script for easy access.

tell application id "DNtp"
	try
		if not (exists think window 1) then error "No window is open."
		if not (exists content record) then error "Please open a document."
		
		set itemURL to get the reference URL of (item 1 of (selection as list)) & "?reveal=1"
		set the clipboard to itemURL
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
	end try
end tell
3 Likes