Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically launch the Mac's System Preferences screen -> Sound

Is there a programmatic way to launch the system settings on Mac and have it focus on the sound pane?

If so, is there a programmatic way to have it default on the "Output" tab?

like image 983
JasonGenX Avatar asked Jun 14 '13 20:06

JasonGenX


People also ask

How do I open System Preferences on Mac?

To change System Preferences on your Mac, click the System Preferences icon in the Dock or choose Apple menu > System Preferences.

How do I get to System Preferences on Mac terminal?

Use General preferences in Terminal to change the default window settings and the type of shell that's used when a new window is opened in Terminal. To change these preferences in the Terminal app on your Mac, choose Terminal > Preferences, then click General. Choose the initial window configuration.

What are 2 things you will find in System Preferences on a Mac?

Within the Display tab, you'll see an image representing your display (or the closest Apple equivalent), Resolution options, a Brightness slider, and some other settings that are determined by your hardware set-up.


1 Answers

There is an easier way:

NSURL * url = [NSURL fileURLWithPath:@"/System/Library/PreferencePanes/Speech.prefPane"];
[[NSWorkspace sharedWorkspace] openURL:url];
like image 70
goooseman Avatar answered Sep 25 '22 19:09

goooseman