Rhino Mac UI SystemEvents consistency

Dear Rhino Developers,

I’m trying to use AppleScript and SystemEvents in order to display some buttons on the Touch Bar only when I use Grasshopper (to access GH shortcuts faster). To do that, I would need to use the SystemEvents “Window Title”, or the “Focused Element Role”.

Usually, the Focused Element Role is set to “AXSplitGroup” while working in the Rhino Window, and to “AXScrollArea” while working in Grasshopper, and I could get everything to work smoothly if this was consistent. However, very often (and I can’t manage to understand when exactly) things get messed up and the Focused Element Role doesn’t change.

As for the Window Title, it takes GH’s window name only when launching GH, then switches back to Rhino’s name and keeps it forever.

Is there anything not too complicated that could be done about this ?

Thanks a lot,

Félix

Changed the topic category to GH dev