Randomize Apple Mail notification sounds |
|
|
While looking for some unique and funny new email notifications for Mail, I found there were too many to choose just one. I thought it would be nice to dump a bunch of .wav files into a folder and have them randomly play when new messages arrive. Here's how:
Place a bunch of .wav (or other supported audio files) in your user's Library/Sounds folder
Paste the code below into an AppleScript and save it as .scpt file somewhere (~/Library/Scripts is a good place):
tell application "Finder"
set thecount to (count items in folder "Sounds" of folder "Library" of (get home))
end tell
set theValue to (do shell script "number=$(( `date +%s``echo $RANDOM` % " & thecount & " + 1)); echo $number") as number
t...
|