I am trying, from a sandboxed menubar application, to get the selected (highlighted) text in the current application. I was using accessibility before and traversing the main menu of the application until finding the copy item but unfortunately, I need to sandbox the application and this is no more a valid approach.
I would like to simulate the ⌘ + C
keyboard shortcut but so far all my attempts failed.