Macro to Work Around a Bug in Scrivener Links

Hello,

When I open Scrivener links in DevonThink, everything works fine except that Scrivener remains in the background and I have to activate it.

is there any possible way I could create a global macro
1- containing only one action: activate Scrivener
2- the macro would be triggered every time I open a Scrivener link.
*All scrivener links contain the prefix " [x-scrivener-item:/// , for example x-scrivener-item:///Users/ronald/Library/Application%20Support/DEVONthink%203/Inbox.dtBase2/Files.noindex/scriv/0/Scrivener%20Imported%20ToDo%20Project%20DO%20NOT%20CHANGE%20NAME.scriv?id=CF9023D1-2736-4A0E-8819-9EC6292BDE7E

thank you very much

I see three possible ways forward: (I don't own any of the apps you mention. So I can't check.)

  1. If either of the two apps you mention support AppleScript, then there's a chance that KM could use that to detect what you are looking for. I'm not very adept at this approach.
  2. If either of those apps has a log file that records actions that you perform, then KM could monitor it and use that information to detect when you click on something. I've done things like this before.
  3. It may be possible to detect your clicks by having KM detect when you are clicking in the DevonThink app by intercepting your mouse clicks. This would be fairly tricky. But I've done this type of thing before.

You emphasized the word trigger. But some of these solutions involve polling, which is a little different from triggering. If you really want triggering, that will limit your options. Polling basically involves checking in an infinite loop, but polling can usually be done without too much of a burden on the CPU.

There are other people on this site who may come up with other solutions. That happens a lot with my advice.

If you could create a video showing what it looks like, that may help me give good advice.

1 Like

thank you. I will read up on your suggestions and try to understand the different methods

This works fine. Thank you again for your post.