Boilerplate to Add AppleScript to Your macOS App in 2020
There’s not a lot to do, but the documentation is (1) old, (2) not maintained anymore, (3) very wordy. The steps involved are actually very simple. I’ll go through them and provide detail and links for further reading. Open the Script Editor app. You’ll want to use that for test-driving your app.