A little script help? -- creating a record so that both text and images survive

I used to script a lot, but I’ve clearly forgotten a lot.

Now my script needs are fewer, but I need to rebuild my small library of shortcuts for the new edition. Can anyone help me edit this line so that the items on the clipboard – both image and text – carry into the new record?

create record with {name:this_title, type:RTF, URL:this_URL, rich text:(this_title & return & return & (the clipboard) & return & return & this_URL)}

Much thanks in advance.

Erik

  • What OS are you running?
  • What version of DEVONthink?
  • Have you actually verified what’s on the clipboard via View > Show Clipboard in the Finder?

Also, here’s a starting point in DEVONthink 4…

tell application id "DNtp"
set newDoc to (paste clipboard in current group) -- Essentially, Data > New > With Clipboard
end tell

That got me all the way there – thank you!

(For the sake of posterity, I’m using Sequoia (Version 15.4.1 (24E263)) and Devonthink 4.0beta2)

Glad to hear it and you’re welcome :slight_smile: