This script copies the Reference URL
-- Copy Reference URL
tell application id "DNtp"
try
if not (exists think window 1) then
error "Please open a window"
else
set theWindow to think window 1
end if
set theRecord to content record of theWindow
if theRecord ≠ missing value then
set thePage to current page of theWindow
if thePage ≠ -1 then
set theRefURL to reference URL of theRecord & "?page=" & thePage
else
set theRefURL to reference URL of theRecord
end if
else
error "Please select a record"
end if
set the clipboard to theRefURL as string
display notification "Copied" with title "DEVONthink"
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell