Page 1 of 1

Simple way to play a sound

PostPosted: Wed Jan 13, 2016 3:56 pm
by greenhornet
I have speakers connected to the Mac running the Indigo Server. I would like to play a sound when triggered. How can I accomplish this?

Thanks in advance for any help.

Re: Simple way to play a sound

PostPosted: Wed Jan 13, 2016 4:23 pm
by ckeyes888
Lot's of ways but one simple solution is an AppleScript.

Code: Select all
Open this Scriplet in your Editor:
do shell script "afplay '/System/Library/Sounds/Hero.aiff'"


Just replace the path and sound file info to what you'd like.

Carl

Re: Simple way to play a sound

PostPosted: Wed Jan 13, 2016 8:07 pm
by greenhornet
Thanks Carl. That worked. Much appreciated.

Re: Simple way to play a sound

PostPosted: Fri Apr 15, 2016 2:35 pm
by Different Computers
I can shorten that script for you.

In AppleScript:

Code: Select all
beep
:D

Re: Simple way to play a sound

PostPosted: Fri Apr 15, 2016 3:25 pm
by jay (support)
Of course, that would only play whatever you have selected as the system beep/alert sound. The approach further up allows you to play any sound that's installed on your Mac... ;)