How to run the Sampsa Script on a specific Database as a smartrule?

I’m new in scripting and tried to modify those awesome scripts of Sampsa for my purpose. But there’s one thing I can’t get my head around. The following script works fine in a smart rule, if last database I was using is the one the ticklerFolder is in. If I am working in another database, the smart rule doesn’t work the was I want it to work.

Could anybody please help me how I can tell this script to use the right database?

So here’s the script:

The command create location doesn’t specify a database. Another issue of the script is that it should use tell application id "DNtp" instead of tell application "DEVONthink 3" so that scripts are compatible to all (future) versions/editions.

Oh it was so simple! I nearly gave up! Thank you so much! It works perfectly fine.