DTPO’s “DEVONthink.sdef” Applescript definitions help lists for the create record with command:
create record with v : Create a new record.
create record with record : The properties of the record
(‘name’, ‘type’, ‘comment’,‘aliases’, ‘path’, ‘URL’, ‘creation’, ‘modification’, ‘date’, ‘plain text’, ‘rich text’, ‘source’, ‘data’, ‘content’, ‘columns’, ‘cells’ and ‘tags’ are possible values).
[in record] : The destination group for the new record. Uses incoming group or group selector if not specified.
→ record
The allowable types are listed in the definition of a record as:
type (bookmark/feed/group/html/PDF document/picture/plist/quicktime/rtf/rtfd/script/sheet/smart group/txt/unknown/webarchive/xml, r/o) : The type of a record.
==============================
Problem: Attempting to create a record of type “rtf” or “rtfd” causes a fatal AppleScript error.
This code:
tell application id "com.devon-technologies.thinkpro2"
create record with {name:"Sample", type:rtfd}
end tell
Displays the Group Selector, and allows selection of a Group, but dies with these Replies:
tell application “DEVONthink Pro”
create record with {name:“Sample”, type:rtfd}
–> missing value
end tell
Result:
missing value
And no record is created.
All of the other types (bookmark, feed, group, and so forth) can be created in script, but rtf and rtfd give the “missing value” error.
This looks like a bug, does it not? I am using DTPO 2.3.5.
==============================
Also, I’d very much like to see “create record with” enhanced to support creating new records based on templates located in ~/Library/Application Support/DEVONthink Pro 2/Templates.noindex folder and its subfolders.
This enhancement would also include evaluation and expansion of placeholders (such as %longDate%) in these templates when using the enhanced create record with command.
Thanks.