I’m trying to compare with record
instead of content
but it only returns results of the current database.
tell application id "DNtp"
try
set theRecords to selection of viewer window 1
if theRecords = {} then error "Nichts ausgewählt."
set thisRecord to item 1 of theRecords
set theDatabases to databases
set allSeeAlsoResults to {}
repeat with thisDatabase in theDatabases
#set theContent to plain text of thisRecord
#set theResults to compare content theContent to thisDatabase --> all databases
#set allSeeAlsoResults to allSeeAlsoResults & theResults
set theResults to compare record thisRecord to thisDatabase --> only current database
set allSeeAlsoResults to allSeeAlsoResults & theResults
end repeat
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