Copying text and images from a record using Applescript?

I’m interested in using Tofu (homepage.mac.com/asagoo/tofu/) as a reader with DEVONthink Pro, and i’d like to write an Applescript to automate the transfer of data from a displayed record into Tofu. Manual copying and pasting from DT Pro to Tofu works great with both rtf and web archives–styled text and images both come across and display nicely. I’ve written an Applescript that will open up Tofu and paste the clipboard into it, and that works fine. However, using Applescript I can’t seem to copy anything other than plain text from the displayed record in DT Pro onto the clipboard. I’ve tried a number of DT Pro’s Applescript commands and all I get is plain text. I’ve also tried to select all and copy the content of the displayed record using Applescript GUI scripting to call the edit menu commands directly. That produces an NSReceiverEvaluationScriptError (4), but I may be losing the selection context when the script runs.

Does anyone have any suggestions on how to copy the complete styled text and image display from a DT Pro viewer or document window to the clipboard using Applescript? If I can get there I can get that into Tofu.

Jim Harrison
Univ. of Virginia

Sounds like a neat and very useful concept. Tofu is a nice piece of freeware.

FYI:
You might get more help if this was posted in the scripting forum.

Sorry I cannot offer help.

cheers

see my answer in the scripting forum about needing to export the record and open/import in Tofu.

But tofu’s function seems useful enough and relatively simple enough that the DEVON wiz team could probably implement it without much trouble in DTP, with column view as an alternate view. I’d vote for that feature, were there voting on such things… :wink: