-
@JoshWComeau I’d recommend using the JXA (AppleScript for JavaScript) api. It’s really poorly documented but it largely matches the scripting definitions you can get from Script Editor (File → Open Dictionary). “Standard Additions” is the default set of features.