Switch current group using AppleScript?

When I move a new document from the Inbox of a database to its final folder (using ⌃⌘M), I often switch to that folder (using ⌘L) to check for missing tags, related documents, etc.

When I want to process the next document, I have to use the mouse/trackpad to navigate back to the Inbox folder. Ideally I would like ⌘L to toggle between the source and destination folders of a moved document instead of just jumping to the destination, but that would be an enhancement request.

To get something working right away I tried to use AppleScript bound to a different key. Unfortunately I can’t get it to work:

tell application "DEVONthink 3"
	set theInbox to parent "Inbox" of current database
	set current group to theInbox
end tell

The assignment to current group doesn’t seem to be allowed. Is there a different way to achieve this?

I do same, but I do all my “manual in-processing” using the “Today” Smart Group. Even when the document is moved into a new group it remains in that view for me to do as you describe. No scripts in play, other than a few Smart Rules processing some documents arriving in the Inbox, of course. Even those show up in the “Today” smart rule view for any hand-tweaking or immediate reading.


The shortcut of Go > Back should be a faster option.

1 Like

I use an Applescript to process Inbox entries; assigning name, tags …
including moving the record to it’s final folder (theFilingGroup)
The final statement of the script is open window for record theFilingGroup
so I can “check for missing tags, related documents, etc.”
When I close that window, I’m back to the Inbox window

1 Like

As the scripting dictionary says:

currentGroup (Record, r/o) : The (selected) group of the frontmost window of the current database. Returns root of current database if no current group exists.

The “r/o” stands for read-only.

But the root of viewer window can be changed, that’s like selecting a group in the sidebar.

Thank you! That is exactly what I needed (⌘[).

By the way, a long click on the < and > buttons in the Path bar opens a popup to choose one of the last locations.

Oh goodness…how one lives and learns! Thank you.