GPT-3 Explains Things To Me: AppleScript vs. JXA

GPT-3, your bot ready to teach ya

What is JavaScript for Automation?

JavaScript for Automation is a scripting language that allows you to automate tasks using JavaScript.

What makes it unique?

GPT-3: JavaScript for Automation is unique because it is the only scripting language that is specifically designed for automating tasks.

Give an example of using JXA.

One example of using JXA is to create a script that automatically opens a new Finder window and displays the contents of a specific folder.

Write the script in JXA.

Where are JXA scripts run?

JXA scripts are run in the JavaScript for Automation environment.

Um, That didn’t work in AppleScripts Editor.

This is because JXA is a different scripting language than AppleScript. JXA scripts can only be run in the JavaScript for Automation environment.

Why not just use AppleScript?

Each scripting language has its own advantages and disadvantages. JXA has the advantage of being specifically designed for automating tasks, while AppleScript has a longer history and more support.

What is AppleScript used for?

AppleScript is a scripting language that allows you to automate tasks on a Mac.

Isn’t that the same purpose as JXA? I’m confused.

AppleScript and JXA serve the same purpose, but they are different scripting languages. JXA is specifically designed for automating tasks, while AppleScript has a longer history and more support.

What is a task?

A task is an action that you perform on a computer.

So like, sorting files on my Desktop?

Yes, that is one example of a task.

Give use-cases for JXA and use-cases for AppleScript.

Some use-cases for JXA include automating tasks such as opening a new Finder window and displaying the contents of a specific folder. Some use-cases for AppleScript include automating tasks such as opening a new Finder window and displaying the contents of a specific folder.

So the same thing!

Yes, both JXA and AppleScript can be used to automate the same types of tasks.

You could have just said that bro.

Sorry, I thought you were confused about the difference between the two scripting languages.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Derek Martin

Full stack developer focusing on AI, GPT-3, Ethereum, and d’Apps. American citizen who embraces messiness. Hopefully less immature than yesterday