I'm talking about the icons that show up on the right hand side of the menu bar. I can get access to that menu bar with (py-appscript)
app(u'System Events').processes[u'SystemUIServer'].menu_bars[1]
& menu_bar_item[1], menu_bar_items[1] & so on refer to each of the icons.
But, there are couple of icons up there that cannot be referenced using this method. For e.g. the search icon in the corner doesn't belong to SystemUIServer. Similarly, our app's icon also shows up there but cannot be referenced like the above example. So how can I reference those icons? I want to perform actions like click, right-click etc. IS there any way to list all the icons displayed on the bar? That way I can always grab the position & click them that way. Any suggestions?