I’d like to use Applescript to get the path of whatever document is showing in the VIEW/EDIT pane. It shouldn’t matter if I had clicked on the document in the main ITEM LIST pane or the “See Also and Classify” pane.
I know how to get the path of the currently selected document in Applescript:
tell application "DEVONthink 3"
set theSelection to the selection
if (count of theSelection) is 1 then
set theString to (path of (item 1 of theSelection))
end if
<do something with theString>
end tell
But “the selection” above refers to whatever is selected in the ITEM LIST pane, so this doesn’t work for me if the document being viewed was selected via See Also and Classify.
So, how to use Applescript to get the path of whatever document is showing in the VIEW/EDIT pane?