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.
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 forrecord theFilingGroup
so I can “check for missing tags, related documents, etc.”
When I close that window, I’m back to the Inbox window
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.
Sorry for resurrecting old threads, but I still can’t work out how this works. (If only AppleScript dictionaries had code examples…)
With this code
tell application id "DNtp"
set theInbox to parent "Inbox" of current database
set root of viewer window to theInbox
end tell
I get Can’t set «class DTro» of «class brws» to «class DTpr» id 9 of «class DTkb» id 2 of application "DEVONthink 3". which doesn’t really mean a lot, especially since the dictionary doesn’t seem to map these four-letter class names to the actual English names of classes.
Does anybody have some example code that will set the current viewer window to the global inbox? I really don’t want to have to add it as a Favourite¹ and then have Keyboard Maestro navigate to that through the menu.
¹ If people using en_GB have to suffer the Trash being called the Bin, it would be lovely if Favourites could be spelt correctly, with the letter U, rather than in the American way
The code makes no sense – what is "Inbox" of current database supposed to be? The thread started, btw, with someone posting this code and stating that it doesn’t work. So little surprise here.
There is a global inbox, which is a database by itself. So, not even inbox of current database makes sense.
Interestingly, when I run the code you posted, I do not get the same error as you. But if I run
tell application id "DNtp"
set theInbox to incoming group of current database
set root of viewer window to theInbox
end tell
the error is indeed similar to what you posted. Weird.
@cgrunenberg: If I run this snippet, where is current group involved? The error occurs on set root of viewer window to theInbox, btw.
error “„«class DTro» of «class brws»“ kann nicht als „«class DTpr» id 9 of «class DTkb» id 9 of application "DEVONthink 3"“ gesetzt werden.” number -10006 from «class DTro» of «class brws»
Perhaps root of viewer window is read-only, too (the documentation doesn’t say so, though)
tell application id "DNtp"
set root of viewer window 1 to incoming group of current database
end tell
works flawlessly. Apparently, the app wants an index with a viewer window. Which is kind of understandable, since there could be more than one of those windows.
The answer to both of these questions is that I want to assign a key on a Stream Deck profile for DT3 to switch to the global inbox — so the system keyboard preferences don’t really help.
@cgrunenberg macOS 14.7.4 — I keep hoping that Apple will release a version of Sequoia where somebody doesn’t immediately find something that stops me upgrading, but it hasn’t happened yet
@chrillekviewer window 1 was the key — and omitting the of current database gets me the global inbox. Thanks!
The answer to both of these questions is that I want to assign a key on a Stream Deck profile for DT3 to switch to the global inbox — so the system keyboard preferences don’t really help.
You don’t need a script to do this with the Stream Deck.
Just use the Global Inbox’s item link with a ?reveal=1 parameter and add it as a URL to a Stream Deck button. And you can do that with any other item in your databases as well.