Can I Change the Volume of Each Audio Output Separately Using AppleScript?

Hello,
So I am new to the apple script.
I can successfully change the output volume of my mac using the apple script.
However, I do have two outputs in my mac.
When I change the main output volume it seems that both "external headphones" and "Mac book pro speakers" volume change at the same time (or it might be just a graphical glitch).
anyway, my question is if it is possible to change a specific output volume using the apple script?
Thank you.

That's an excellent question. Most likely each device gets its own audio setting. However your question is so reasonable I googled what other people have done to solve this. And I learned that in MacOS you can create a multiple-output audio device. I had no idea you could do this.

So the good news is that you might be able to set multiple devices with a single AppleScript command that way, if you combine your two devices into a single device. But the bad news is that you may have to change your AppleScript. And I'm not good enough with AppleScript to figure that part out.

If you want to try this out, open the Utilities folder in your Applications folder, and launch the app called Audio MIDI Setup.

I'm not certain if this will work or not for you, but I'm really excited about this possibility. I'm going to experiment with it today.

Thanks, In the Audio midi set up I can see all the outputs as they should.
I am aware of Aggregate Device also, I used to use that instead a few years ago.
I can't recall if the Aggregate Device was a hassle or maybe it got much better nowadays with a new OS and all.

I ended up writing a Macro for it.

Prompt for User Input Action (v10.0.2)

Prompt for User Input.kmactions (1.2 KB)

Keyboard Maestro Export

1 Like