Script to stop and start the sorter

I dislike using the dock. Here is a script to stop and start the sorter, whether DT is running or not, leaving DT in whatever state it was in when the script is started… It’s written for DTPO, but you can easily modify it for DTP. I named the script “DV_Sort” and trigger it in LaunchBar with the abbreviation “dvs”


(* DV_Sorter Turns Devonthink Sorter On or Off, leaving
DT Pro Office in its original state*)
tell application "System Events"
	if exists application process "DEVONthink Pro Office" then
		if not (exists application process "DEVONthink Sorter") then
			tell application "DEVONthink Sorter" to activate
		else
			tell application "DEVONthink Sorter" to quit
		end if
	else -- i.e.if DTPO is not running
		if not (exists application process "DEVONthink Sorter") then
			--start DTPO temporarily
			tell application id "com.devon-technologies.thinkpro2" to activate of background
			tell application "DEVONthink Sorter" to activate
			tell application id "com.devon-technologies.thinkpro2" to quit --turn off DTPO
		else
			tell application "DEVONthink Sorter" to quit
		end if
	end if
	
end tell

Thanks for posting this script! But what’s the reason for starting/quitting the Sorter instead of keeping it open all the time? You don’t like the Dock and therefore you don’t like the Sorter, too? Or anything special?

In the end, the script has no real utility. I dislike using the mouse or trackpad to trigger actions, and I just wanted to see if I could control the Sorter with a script.

I’ve always known that with CMD-a, one can “select” documents and folders in the Finder to copy them elsewhere. I just discovered that if I select a file in that way, the Sorter shortcut will place the file in the global inbox.

So, the Sorter shortcut now joins the very short list of shortcuts that I’ve memorized. (For the rest, I use LaunchBar.) The Sorter is a great new feature, and I’ll be using it regularly. Thanks.