I see from your answer to the other topic that you've already discovered AXProcessIsTrustedWithOptions
, which will take the user straight to the privacy accessibility settings; you're presumably wanting to implement your own user prompt that is less baffling and suspicion-arousing than the official alert provided by that function.
You can open the Security & Privacy preferences pane and navigate straight to the Accessibility section using Applescript:
tell application "System Preferences"
--get a reference to the Security & Privacy preferences pane
set securityPane to pane id "com.apple.preference.security"
--tell that pane to navigate to its "Accessibility" section under its Privacy tab
--(the anchor name is arbitrary and does not imply a meaningful hierarchy.)
tell securityPane to reveal anchor "Privacy_Accessibility"
--open the preferences window and make it frontmost
activate
end tell
One option is to save this to an applescript file with Applescript Editor and execute it directly:
osascript path/to/applescript.scpt
You can also perform the equivalent commands from your Objective C application code via the Scripting Bridge. This is a little more involved in that you need build an Objective C header (using Apple's commandline tools) that exposes the System Preferences scripting API as scriptable objects. (See Apple's Scripting Bridge documentation for details of how to build a header.)
Edit: Once you've built a System Preferences header, the following Objective C code will do the same work as the Applescript above:
//Get a reference we can use to send scripting messages to System Preferences.
//This will not launch the application or establish a connection to it until we start sending it commands.
SystemPreferencesApplication *prefsApp = [SBApplication applicationWithBundleIdentifier: @"com.apple.systempreferences"];
//Tell the scripting bridge wrapper not to block this thread while waiting for replies from the other process.
//(The commands we'll be sending it don't have return values that we care about.)
prefsApp.sendMode = kAENoReply;
//Get a reference to the accessibility anchor within the Security & Privacy pane.
//If the pane or the anchor don't exist (e.g. they get renamed in a future OS X version),
//we'll still get objects for them but any commands sent to those objects will silently fail.
SystemPreferencesPane *securityPane = [prefsApp.panes objectWithID: @"com.apple.preference.security"];
SystemPreferencesAnchor *accessibilityAnchor = [securityPane.anchors objectWithName: @"Privacy_Accessibility"];
//Open the System Preferences application and bring its window to the foreground.
[prefsApp activate];
//Show the accessibility anchor, if it exists.
[accessibilityAnchor reveal];
Note however that (last I checked, at least) the Scripting Bridge is not usable by sandboxed applications.