Duplicate duplicate command

DT’s scripting dictionary provides two duplicate commands: one from the Standard Suite, and one from the DT suite. The latter one works as announced from JavaScript. The former one … well, I have no idea how one would use it from the description:

duplicate specifier : the object for the command
[to: location specifier] : The location for the new object(s).
[withProperties: [Record]] : Properties to be set in the new duplicated object(s).

app.duplicate(record)
complains about a missing parameter (and the protocol shows that duplicate is called without a parameter. The same seems to happen with AppleScript:

tell application id "DNtp"
	set rec to item 1 of selected records
	duplicate rec as reference
end tell

Error message:

	duplicate content id 92470 of database id 2
		--> error number -1701
Ergebnis:
error "„DEVONthink 3“ hat einen Fehler erhalten: Einige Parameter fehlen für „duplicate“." number -1701

If I understand the documentation correctly, the parameters to and with parameters are not required – so what parameter is missing?

Sorry if that’s a stupid question, but I didn’t find anything on The Net either – seems people know how to use that method or they’re not using it for anything but duplicating files in Finder.

The only one provided by DEVONthink is the one of the DEVONthink suite, the commands of the standard suite don’t support records at all.

1 Like