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