Changing System Sounds

Discussion in 'macOS' started by kurtrandom, Jul 18, 2008.

  1. kurtrandom macrumors newbie

    Joined:
    Jul 18, 2008
    #1
    I was looking this morning for ways to change the default system sounds and didn't find much. So, I decided to write my own applescript that did it for me! It is reproduced below. Feel free to use it and change it to suit your needs. Just don't blame me if you screw something up:eek:
    I did include a backup of the current sound and a way to restore it, so I don't expect it to give anyone trouble. It currently only changes the empty trash noise.
    Anyway, here goes:

    --This script will back up the default system sound for emptying the trash and copy any other aiff file. First, name your desired sound "empty trash.aif" and place it on your desktop. Then just run the script and follow the prompt. To get the sound to take effect, you do have to log out and log back in. If something goes wrong and the script doesn't work, run the restore portion of the script before trying the change portion again.
    --If you do a little snooping, you can pretty easliy change this script to change any of the default sounds. Just don't blame me if you screw something up.

    display dialog "Do you want to 1. Change the Noise or 2. Restore the original noise 3. Do a little snooping" default answer ""
    set doWhat to text returned of result


    if doWhat is "1" then
    display dialog "This will change your empty trash noise. Please enter your password." default answer "password"

    set userpassword to text returned of result
    set name1 to "empty trash.aif"
    set name2 to "empty trash.aif_bu"

    do shell script "cd /System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/finder/;sudo mv " & quoted form of name1 & " " & quoted form of name2 & "" password userpassword with administrator privileges

    display dialog "Make sure that the file you wish to use is on your desktop and named 'empty trash.aif'"

    do shell script "cd ~/Desktop/;sudo cp " & quoted form of name1 & " /System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/finder/" password userpassword with administrator privileges

    display dialog "Done!"

    else if doWhat is "2" then
    display dialog "Please enter your password." default answer "password"

    set userpassword to text returned of result
    set name2 to "empty trash.aif"
    set name1 to "empty trash.aif_bu"

    do shell script "cd /System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/finder/;sudo rm " & quoted form of name2 & ";sudo mv " & quoted form of name1 & " " & quoted form of name2 & "" password userpassword with administrator privileges

    display dialog "Done!"

    else if doWhat is "3" then
    do shell script "cd /System/Library/Components/CoreAudio.component/Contents/Resources/SystemSounds/;open ."

    else
    display dialog "You chose poorly. Goodbye."

    end if
     
  2. PowerFullMac macrumors 601

    PowerFullMac

    Joined:
    Oct 16, 2006
    #2
    Mind if I put this on my site?

    I messed with my sounds once, I made the volume sound da-da-da-da (from the beginning of a Gym Class Heros song) instead of the pop noise! Great fun it is!
     

Share This Page