# Interesting post on Applescript vs JXA

**URL:** <https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931>\
**Category:** Automation\
**Created:** [May 8, 2022, 4:59pm UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931 "2022-05-08T16:59:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdbraber](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mdbraber/32/5802_2.png) [@mdbraber](https://discourse.devontechnologies.com/u/mdbraber)\
**Post date:** [May 8, 2022, 4:59pm UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/1 "2022-05-08T16:59:10Z")

</div>

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](https://leancrew.com/all-this/2022/05/jxas-parenthesis-paradox/)

---

<div class="post-metadata">

**Author:** ![BLUEFROG](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/bluefrog/32/135_2.png) [@BLUEFROG](https://discourse.devontechnologies.com/u/BLUEFROG)\
**Post date:** [May 9, 2022, 12:33am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/2 "2022-05-09T00:33:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [May 9, 2022, 7:17am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/3 "2022-05-09T07:17:30Z")

</div>

> [@](#):
>
> The more I delve into JXA, the more I think I should stick with AppleScript and get more clever about using do shell script with Perl or sed for string processing.

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.

---

<div class="post-metadata">

**Author:** ![mdbraber](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mdbraber/32/5802_2.png) [@mdbraber](https://discourse.devontechnologies.com/u/mdbraber)\
**Post date:** [May 9, 2022, 7:36am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/4 "2022-05-09T07:36:51Z")

</div>

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.](https://forum.latenightsw.com/t/regexandstufflib-script-library/2018)

I’ve used it quite extensively in my Markdown / Obsidian annotation scripts and rules: [Automatically capture and annotate items (to use with Obsidian)](https://discourse.devontechnologies.com/t/automatically-capture-and-annotate-items-to-use-with-obsidian/70435)

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [May 9, 2022, 7:42am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/5 "2022-05-09T07:42:06Z")

</div>

> [@mdbraber](#):
>
> 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.](https://forum.latenightsw.com/t/regexandstufflib-script-library/2018)

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.).

---

<div class="post-metadata">

**Author:** ![mdbraber](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mdbraber/32/5802_2.png) [@mdbraber](https://discourse.devontechnologies.com/u/mdbraber)\
**Post date:** [May 9, 2022, 7:43am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/6 "2022-05-09T07:43:22Z")

</div>

> [@cgrunenberg](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![mdbraber](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/mdbraber/32/5802_2.png) [@mdbraber](https://discourse.devontechnologies.com/u/mdbraber)\
**Post date:** [May 20, 2022, 7:19am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/7 "2022-05-20T07:19:16Z")

</div>

> [@cgrunenberg](#):
>
> 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.

@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](https://redsweater.com/blog/3822/fastscripts-3-1-streamlined-regular-expressions)

---

<div class="post-metadata">

**Author:** ![system](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/2X/4/4e6ff70c96be2eb307a274d890bba8d71ba671b3.png) [@system](https://discourse.devontechnologies.com/u/system)\
**Post date:** [May 19, 2025, 7:19am UTC](https://discourse.devontechnologies.com/t/interesting-post-on-applescript-vs-jxa/70931/8 "2025-05-19T07:19:28Z")

</div>

This topic was automatically closed 1095 days after the last reply. New replies are no longer allowed.
