AppleScript: Graphic User Interface (GUI) Scripting
AppleScript is an amazing facility and undervalued strength of macOS. I&#x27;ve found it useful for automating content management workflows for people that prefer a GUI over a shell script. You can also use it directly from a shell script via `osascript -e &quot;XXXX&quot;` to show pop-up windows or take simple inputs.<p>It&#x27;s really a pity that AppleScript &#x2F; Open Script Architecture doesn&#x27;t have more documentation love, and that support in the macOS ecosystem for scripting is falling off as developers adopt web-focused or iOS-focused app architectures.<p>AppleScript itself is a weird, slow language, but you can use JavaScript (executed by JavaScriptCore) instead with the same scripting libraries. In fact, there&#x27;s a whole architecture to extend the macOS scripting system with different interpreters. On my system, the following are available:<p><pre><code>    $ osalang -l
    ascr appl cgxervdh  AppleScript
    jscr appl cgxe-v-h  JavaScript
    scpt appl cgxervdh  Generic Scripting System
</code></pre>
But, there are constants defined in Swift for a bunch of scripting languages: <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;uniformtypeidentifiers&#x2F;uttype&#x2F;3551541-osascript" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;uniformtypeidentif...</a>