Quitting DEVONthink Remotely

I have DEVONthink on my desktop at home and a laptop I use on the run. I have Dropbox syncing the database.

However, occasionally I forget to quit DEVONthink before I leave the house and find the database “in use” when I try to open DEVONthink on the laptop. Not wanting to corrupt the database by having it open in two locations but also not wanting to head home just to quit the application, I have been thinking of ways of contacting my computer, which is on a home network without an externally exposed ip address.

One way is to send myself an email which has a rule set up to run an applescript to quit DEVONthink in Apple Mail and then wait for my mail application at home to check for new mail.

Today I came across this solution which works great for me:

elasticthreads.tumblr.com/post/1 … pplescript

It sets up a folder action in dropbox. Following the instructions I can now quit DEVONthink anywhere I have an internet connection using PlainText for the iphone or, on my laptop merely saving a script I have put in the appropriate folder under a new name so that the file is re-added by dropbox and the folder action is triggered again. The simple script is just:

tell application id "com.devon-technologies.thinkpro2" to quit