How exactly did you use the script bridge?
I tried with this code and I think it works quite well:
SystemPreferencesApplication *SystemPreferences = [SBApplication applicationWithBundleIdentifier:@"com.apple.systempreferences"]; @try { [SystemPreferences activate]; SystemPreferences.currentPane = [SystemPreferences.panes objectWithID:@"com.apple.preference.security"]; } @catch (NSException *exception) { NSLog(@"%@", [exception description]); }
Here is another entertainment option that Cocoa has but is not documented at all (and only works with system preference panels). You can use it to compare characteristics, but do not use it in production code.
id bezelServicesTask = [NSConnection rootProxyForConnectionWithRegisteredName:@"com.apple.BezelServices" host:nil]; [bezelServicesTask performSelector:@selector(launchSystemPreferences:) withObject:@"Security.prefPane"];
0xced
source share