OS X: Set the output device for sound effects with AppleScript

When I switch audio output devices from LaunchBar, sometimes Mavericks decides to change my system sound effects to my laptop's internal speakers rather than the selected audio device, which is what I always want.

The command line utility I use to switch audio output sources doesn't support changing the sound effects output device, so I threw together an AppleScript. The AppleScript has to pull up the Sound panel in System Preferences on the screen, so it takes a second to run, but it's still way faster than doing it manually.

🌟 Was this page helpful? Please let me know with this quick, 3 question survey.