Best approach for an "Fill URL property from clipboard" functionality

I would like to add a little helper script to DEVONthink 4 for the this workflow:

I have a URL on the clipboard and I select an document in DEVONthink. Then I press a keyboard shortcut which executes the helper doing the following:

  • The URL content of the clipboard is inserted in the document’s URL field/property.

My question is: What is the best approach to achieve this? DEVONthink offers a few automation options: (Apple)Scripts in DEVONthink, Smart Rules, global scripts, etc. What is the best method to use here?

Many thanks for pointers and recommendations!


PS: Years ago I created a similar helper (which adds the document name to the document’s finder comment). For this I wrote a global AppleScript somewhere in the filesystem which is called from Keyboard Maestro via a chosen keyboard shortcut. Still works great, but I am curious whether these days a solution “closer to DEVONthink” (i.e. easier visible in DEVONthink) is recommended.

My vote is Applescript

Thanks for chiming in @DTLow

So an external AppleScript somewhere on the file system and the shortcut is triggered from an external utilty (like Keyboard Maetsro)?

Actually the scripts are stored/processed with shortcuts within Devonthink ; no external app needed

Take a look at the AppleScript section in the Devonthink manual

Where are the stored? In the scripts menu?

(Years ago I tried to add a shortcut to a script in the script menu via the filename convention, but somehow it didn’t work well. - Might have been my bad. That’s why I went for the Keyboard Maestro solution)

1 Like