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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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