Interesting post on Applescript vs JXA

Whether AppleScript or Javascript for Automation (JXA) is the best (or depending on your views: least bad) automation language still remains a question of preference. They both have pros and cons. Just thought it was interesting to point out this post of the always interesting Dr. Drang on JXA vs AppleScript, also referring to some excellent knowledge written by @chrillek: JXA’s parenthesis paradox - All this


Nice shout out as Dr. Drang is a veteran in the Mac world.
Congrats @chrillek :slight_smile:

As string processing is definitely a shortage of AppleScript and usage of the foundation framework or of shell scripts is cumbersome & killing AppleScript’s readability, I actually wondered lately whether adding a small script suite for string processing (e.g. find/replace, conversion to lower/upper/camel case etc.) would make sense. Ideally that would be a task for Apple but I’m not holding my breath.

1 Like

Totally agreed string / text processing is lacking in AppleScript. I’m using RegexStuffAndLib for things like regex matching, string conversion etc. It’s really nicely made (including a dictionary) by Shane Stanley (author of Script Debugger). See RegexAndStuffLib Script Library - AppleScript - Late Night Software Ltd.

I’ve used it quite extensively in my Markdown / Obsidian annotation scripts and rules: Automatically capture and annotate items (to use with Obsidian)

1 Like

Unfortunately third-party stuff is not an option for scripts which are part of DEVONthink or offered in the support assistant. Especially scripts for the assistant have to meet several conditions (e.g. no customization or third-party additions necessary, error handling etc.).

Understood. I think it would be quite easy to take a cue from Shane’s library and even better for reasons you mention if it can be integrated into DT.

@cgrunenberg maybe this is interesting to check - FastScripts just had the same idea: they added a Text Processing Suite: FastScripts 3.1: Streamlined Regular Expressions - Red Sweater Blog

1 Like