That’s an quite old script I never looked into again and just posted when halloleo asked. Obviously I didn’t know a better way back then. Yes, it’s very complicated
As I have to update some scripts here anyway due to DEVONthink 3.6’s new reporting of errors for invalid syntax I’ll clean up such things in one go. I didn’t stop to use “search windows” in a lot of scripts in order to keep them useable with DEVONthink 2 - now, due to the new error reporting, they all fail However in general the new behaviour is very welcome.