My Devonthink database is indexed and I have a script which, when a pdf is selected in Devonthink, it creates another file of annotations in the indexed folder. I would like to attach another script which will reindex that group in Devonthink so that the newly created file appears in Devonthink.
I have tried with this simple script but it does not work - can anyone suggest a solution?
tell application id "com.devon-technologies.thinkpro2"
set theGroup to current group
deconsolidate record theGroup
synchronize record theGroup
There are several varieties of such a script posted in the forum – have you searched the past threads?
I had looked and then appears to be script triggers for indexing a group which I currently use and I found another script which will index the whole database but I could not find a script which would get the group folder of a selected file and then update the indexed items for that group but maybe I just missed it. Would you mind pointing me in the right direction.
Perhaps this will work:
tell application id "DNtp"
set theRecord to content record
set theParent to the first parent of theRecord
deconsolidate record theParent
synchronize record theParent
Only works on a single selected record, but if that record is a group that is a child of an indexed group, then the parent and all of its children will be deconsolidated (i.e., “move external” on every child) and then synchronized. So, be careful – it that is not what you want then do not use this script.
Thank you. That was just what I was looking for.