Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can AS change the system beep?



On 2007-06-14, at 10:12:39, Tut wrote:

I have been trying to find a way to change the System alert sound (beep) using AppleScript, but have only found discriptions of the use of “beep n”. I am looking for something like: set System beep to “Basso”.

Can it be done?

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"

will get you the current sound preference settings and you should be able to write something like:

do shell script "defaults -currentHost write com.apple.sound.beep.sound '/path/to/sound.aiff'

to set the POSIX path for the new sound.


Philip Aker email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Can AS change the system beep? (From: Tut <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.