Skip to main content
Known Participant
May 13, 2015
Question

play sound

  • May 13, 2015
  • 1 reply
  • 592 views

I know that there are a number of system sounds easily accessible on the mac

/System/Library/Sounds/Glass.aiff

Is there a simple way to play one of them as a notification at the end of a long running script?

This topic has been closed for replies.

1 reply

Vamitul
Legend
May 13, 2015

use a apple script:
do shell script "afplay /System/Library/Sounds/Glass.aiff"

or even more fun, as suggested on stackoverflow, use text to speech: "say Hasta la vista, Baby"

Known Participant
May 13, 2015

‌unfortunately, the script I am writing is in JavaScript, not AppleScript. I'll try to see if I can invoke a shell script from JS.

Vamitul
Legend
May 13, 2015

app.doScript is what you need