Robot/robot-js

Window.isAxEnabled() on Sierra

Disorrder opened this issue · 3 comments

Well, I've got false. How can I get accessing? Running script from terminal and had no any alert about accessing

Make sure you give terminal accessibility rights in the user preferences of your computer.

OSX is a little strange with regard to how "Accessability" permisisons are granted...
You might assume that the "node" binary itself needs the permissions, but that's not the case.
Permissions need to be given to whatever full application is the ultimate parent of node.
This would be an app like Terminal or iTerm2, or Automator, depending on how you are launching node.

The settings in question can be found in System Preferences...->Security & Privacy->Privacy->Accessibility

Also, if you launch your node script from Automator (as a raw workflow) or an Automator-app (built from your workflow), you can use isAxEnabled(true) to pop the confirmation dialog that has the link directly to the appropriate preferences page, with the app in question pre-added to the list (in a disabled state).

@p120ph37: Thanks for a more detailed explanation. I'm going to close this issue, If there's still a problem I will reopen it!