Help with creating a macro please?

Help Please from New Zealand. I use on my 2010 MacPro but there is a glitch for me in that every time I restart, the sound defaults to internal speaker. If I open sound preferences and select “Line Out” it briefly moves to there and then boombox takes over.

Peter suggested I’d get the best help here.

What I want to do is to create a macro that at a suitable time after login Sound Preference Pane gets selected and then “line out” gets selected so that boombox will take over.

For me the timing is easy and the selecting of sound preference pane also but I’m a little rattled on where to go from ther.e. I’ve tried mouse clicks etc which so far hasn’t worked and also my reasoning is that the sound preference pane window may not be in exactly the same place each time its opened.

So if some kind contributer can put me in the right direction, this will be a great help.

Desmond Foulger.

Seems to me there were some topics on this previously.

I just did a search, and found this:

Perhaps this will help? If not, try some additional searches.

Tip: Sometimes I get better results if I go to Google, and do searches like this (as an example):

audio source

Hope this helps.

Thank You Dan -KeyboardMaestro is such a comprehensive and user friendly app and Peter is always quick to respond that I thought I would try the forum. The main reason apart from my ptp was to learn how to create macros that navigate between and in windows that dont have a keyboard command to switch to . Your suggestions re applescript (which I am hopeless at) and google search are appreciated and I’ll continue on with my research. Be Well

Hey Desmond,

See this post:

I just tested and it still works on Sierra.

Install the AudioSwitcher executable in the designated place and then in the run:

AudioSwitcher -a

Post the output to the forum, and one of us will help you write the appropriate script for your purpose.


I'm pretty bad at it also. That's why I've been learning JavaScript for Automation (JXA). At least it has syntax like normal programming languages. :slight_smile: