Menu Bar Item Help
Hi there, apologies for the basic nature of this question. Hopefully that just means its very quick to answer.
I'm trying to make a macro for selecting Loud/Normal/Quiet/Soft (and later the input sources would be handy) from the ListenHub menu bar. I am able to click the first item "Open ListenHub", but the ones below have the greyed out headers, and I'm not sure how to select these.
To open ListenHub, I have this:
sf.ui.app('com.sonnox.listenhub').getElement('AXExtrasMenuBar').popupMenuSelect({ menuPath: ['Open ListenHub'] });
and the full list looks like this:

Any help would be appreciated!
Thanks
- EEdward Sokolowski @Edward_Sokolowski
I found another post where someone had kindly written all the paths out. Turns out there was a number of spaces that needed to be included in the path name.
Here is the post: Selecting 2nd item of identical name in popup menu #post-10
- In reply toEdward_Sokolowski⬆:Kitch Membery @Kitch2024-05-08 22:06:00.771Z
Extra menu bars that reside up by the system clock can be tricky to work with, however give this script a go and see if it does what you need.
const app = sf.ui.app('com.sonnox.listenhub'); const extraMenuBar = app.getElement('AXExtrasMenuBar'); const extraMenuBarItem = extraMenuBar.children.first; extraMenuBarItem.popupMenuSelect({ menuPath: ["Open ListenHub"], });
This script is untested as I don't have Listen Hub on my system. So it's purely a guess.
Let me know how it goes for you.