AppleScript alternatives
Since Yosemite, OS X/macOS also supports JavaScript as an inter-process scripting language--officially known as JavaScript for Automation, also referred to as JXA. The documentation (and some would say, the implementation) is somewhat lacking compared to AppleScript, but if you're already more familiar with JavaScript than AppleScript, then it might be an option.

Like AppleScript, JXA also offers an ObjC bridge allowing you to use Cocoa APIs in your JavaScript.

One advantage is that there are many more editors and IDEs out there designed for JavaScript coding than there are for AppleScript, though Script Editor and Automator probably still have the edge for debugging JXA-specific stuff.

Official resources:


Mac Scripting Essentials (covers AppleScript and JavaScript)
JXA Release Notes


Some unofficial resources:


https://github.com/dtinth/JXA-Cookbook/wiki 
https://www.macstories.net/tutorials/getting-started-with-javascript-for-automation-on-yosemite/
https://hackmag.com/coding/getting-to-grips-with-javascript-automation-for-os-x/
https://tylergaw.com/articles/building-osx-apps-with-js
https://stackoverflow.com/questions/tagged/javascript-automation