Hi again Korm, is there away to modify your script to check if URL is already in the “Reading list” ? Currently this script doesn’t check in the Reading list.
Thank you.
tell application id "com.apple.Safari" to tell window 1 to set theURL to current tab's URL
tell application id "DNtp"
try
set theDatabases to databases
set theResults to {}
repeat with thisDatabase in theDatabases
set thisDatabasesResults to lookup records with URL theURL in thisDatabase
set theResults to theResults & thisDatabasesResults
end repeat
set ResultCount to (count of theResults)
if ResultCount = 0 then
display notification "No item found" with title "DEVONthink"
return
end if
if ResultCount = 1 then
open window for record (item 1 of theResults)
activate
return
end if
if ResultCount > 1 then
set theSearchURL to "x-devonthink://search?query=" & theURL
open location theSearchURL
end if
end try
end tell