I’m trying to write a simple applescript to duplicate a record to the current group (to avoid having to select the current group with the mouse). I’m new to applescript, and the script below keeps saying “missing value.” Does anyone know what is missing?
tell application "DEVONthink Pro Office"
set theSelection to the selection
if (count of theSelection) < 1 then error "Please select one or more items."
set theCurrentGroup to current group
duplicate record theSelection to theCurrentGroup
end tell
Did you know that command-d will duplicate the current selection (either a document, or a group)?
Anyway, if a script is needed, this will do
tell application id "DNtp"
duplicate record content record to the current group
end tell
“content record” is “The record of the visible document in the frontmost think window.”. It is not necessary to declare the database, or the group, if you are working with a single record in a single group.
If you wanted to duplicate the record someplace else (including creating a new group for the destination) then you could use
duplicate record content record to display group selector