How to create floating UI elements on macOS like Grammarly?

How do I create a floating button on top of another app?

How do I highlight text inside the textbox of another app?

This is how Grammarly works on macOS. It seems that they use accessibility features, but I know nothing else about how to achieve this.

Post not yet marked as solved Up vote post of mntruell Down vote post of mntruell
600 views

Replies

Hello Apple? Why are you making things so difficult for us?