I am working on the app which needs to be enabled from System Preferences > Security and Privacy > Privacy > Accessibility.
Right now, I am using the following code to open window shown in the screenshot below:
-(IBAction)enableAccessibility
{
NSString *script = @"tell application \"System Preferences\" \n reveal anchor \"Privacy\" of pane id \"com.apple.preference.security\" \n activate \n end tell";
NSAppleScript *scriptObject = [[NSAppleScript alloc] initWithSource:script];
[scriptObject executeAndReturnError:nil];
}
But not necessary that it will open "Accessibility" tab. Instead, it opens previously opened tab.
So Please suggest me the way to modify this code which will open specifically "Accessibility" Tab from the side menu of this window.
Thanks in advance.