I’ve read several very old posts about this issue, but couldn’t find an answer that worked.
(Using DT3 Pro 3.9 on a Mac)
I’ve created some basic rules to add tags to .eml files upon import after they are sent to my Inbox from the DT3 “Add Messages to DEVONthink” Apple Mail Add-On. They work perfectly, but the one additional step I cannot figure out is how to change the thumbnail of those imported .eml documents to a custom png file.
Please note that I am NOT an expert on writing scripts, but I have tried using some suggested scripts to make this process happen. Here are two examples:
APPLESCRIPT:
on performSmartRule(theRecords)
tell application id "DNtp"
set theIcon to "/Users/phil/My Files/DevonThink Icons/Email Icon.png" -- replace with the actual path to your custom icon
do shell script "sips -i " & quoted form of theIcon & " -s com.apple.Icon^M " & quoted form of thePath
end tell
end performSmartRule
JAVASCRIPT:
function performsmartrule(records) {
var app = Application("DEVONthink 3");
app.includeStandardAdditions = true;
tell application id "DNtp"
set theIcon to "/Users/phil/My Files/DevonThink Icons/Email Icon.png" -- replace with the actual path to your custom icon
do shell script "sips -i " & quoted form of theIcon & " -s com.apple.Icon^M " & quoted form of thePath
end tell
}
These have both been tried from the “Execute Script” action within the DT3 rules. Neither of them actually added the custom icon, nor did they issue any kind of error message.
I can easily make any of these imported .eml files display my custom png image by simply showing the Properties of the document and pasting my image over the default icon / thumbnail image, so it seems like there would be a way to automate this same process.
Okay, enough rambling. Can anyone tell me how to do this?? I’d be extremely grateful for any help.