I am now using DEVONthink version 3 and have adapted my macro accordingly @TheWart.
The script I can not provide you, but the macro already @lushuliang
Please create a shortcut for the DEVONthink service here:
Of course you can use a different shortcut. You can then change this in the macro (green) accordingly.
DEVON <1BD6 200324T224915>.kmmacros (26,6 KB)
With the action marked in red I moved the cursor into the DEVONthink window. The dimensions are 27 inches for an iMac. You might have to change this for you.
Here is the macro in action: