Yes, you can probably script System Preferences but a more
expedient way is to use the shell command "defaults" in a 'do shell
script':
do shell script "defaults -currentHost read | grep
com.apple.sound.beep"
I'm puzzled by something. This command indicates that the system beep
is stored in a file named "com.apple.sound.beep.plist" or at least in
a plist file whose name begins with "com.apple.sound". I've looked
for such a file in the Library, System and User folders, but there is
none. Yet, I am able to change the system beep via the System Prefs
Sound pane, so I presume the value is stored somewhere.
When I enter 'defaults domains' in Terminal, the domains list does
NOT include "com.apple.sound...", but when I enter ...
defaults -currentHost read | grep com.apple.sound.beep
I DO get what appears to be correct results ...
"com.apple.sound.beep.enabled" = 1;
"com.apple.sound.beep.sound" = "/System/Library/Sounds/
Glass.aiff";
"com.apple.sound.beep.volume" = 0.9972414;
Does anyone know the path to the file where this information is stored?