Switch audio output, there and back

Is it possible to macro a decision in a preferences window? I want to create a macro that changes the audio output of the Mac from one set of speakers to another, and another macro to change it back again. I have succeeded in opening the Sound Preference Pane, but when I tried "Select or Show a Menu Item" to make the switch nothing happens. I end up having to make the choice either by clicking on the selection or tabbing to it. What I am hoping to accomplish is to have the macro do the selecting.


Many thanks.

Search the forum for "Switch audio output"...