objective c - Programmatically open PrefPane with section -


i need open network-prefpane in app. works fine with

[[nsworkspace sharedworkspace] openfile:@"/path/to/prefpane"]; 

but how can directly open "proxy-settings", in "network-pref" under "advanced"?

you can see in safari-settings under "advanced->proxies"

thanks

the easiest , cleanest way i've found use applescript.

nsapplescript *a = [[nsapplescript alloc] initwithsource:@"tell application \"system preferences\"\nactivate\nset current pane pane \"com.apple.preference.universalaccess\"\nend tell"]; [a executeandreturnerror:nil]; [a release]; 

replace com.apple.preference.universalaccess name of pane. here full list of preference pane names.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -