Enable access for assistive devices programmatically

468 Views Asked by At

I want to enable access for assistive devices programmatically.

Have another way to do this that not use

NSURL *prefPaneURL = [NSURL fileURLWithPath:[[paths objectAtIndex:0] stringByAppendingPathComponent:@"UniversalAccessPref.prefPane"]];
            [[NSWorkspace sharedWorkspace] openURL:prefPaneURL];

to open System Preferences?

1

There are 1 best solutions below

0
On

you can use apple script

tell application "System Events" to if not UI elements enabled then
    set UI elements enabled to true
end if