Smart Rule to Search and Replace Markdown Contents

Yes! You did

  • remove the use statements
  • create a Script Library
  • create a Smart Rule script

That’s good :slight_smile:

But you also need to

  • remove the handler
    (as it can’t be used embedded in a Smart Rule script. That’s the only reason why it’s necessary to use a Script Library: to be able to remove it from the Smart Rule script)

  • call the Script Library from the Smart Rule
    (which means replacing my with script "[name of the Script Library]"'s.
    my is only used to call an embedded handler.)

Ah, I see your edit, so you’ve found the first mistake. Replace my and it should work.


If you use an external Smart Rule script: remember to restart DEVONthink as scripts are cached

(or see Script: Comfortably developing a Smart Rule Script)

1 Like