Using Apple Script to launch System Preferences in to highly specific location

I’m working on my next update for my goofy little macOS application Trash Talker. This app heavily leverages macOS’s built-in Speech Synthesis engine.

I wanted to add some user-support to help them edit the available voices. I could have just written-out instructions, but reading is for the literate. It took me a while to find a method that I guess will be a good starting point, which is to invoke an Apple Script to direct System Preferences to the right location.

After some hours (I’ve never looked at Apple Script before), I cobbled-together a working solution:

I’ve posted the code for this in gitlab, so have fun with that.

Here’s a direct link to the actual Apple Script.