• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Play sounds via script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Play sounds via script


  • Subject: Re: Play sounds via script
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 03 Mar 2013 09:54:03 -0600

On Mar 3, 2013, at 9:06 AM, Robert Poland wrote:

There must be a better way. The System must have a way to play it's sounds?

Yes and yes!
Here is what I use to play music while a script burns a DVD ...

set soundPath to (quoted form of (POSIX path of soundAlias))
set soundpid to do shell script "afplay " & soundPath & " &> /dev/null & echo $!" -- start the music

If the music finishes (soundpid disappears) before the burn finishes,
then I do line 2 above again. When the burn pid disappears, I kill the soundpid.

See the afplay man page for more info.



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

This email sent to email@hidden

  • Follow-Ups:
    • Re: Play sounds via script
      • From: Luther Fuller <email@hidden>
    • Re: Play sounds via script
      • From: Robert Poland <email@hidden>
References: 
 >Play sounds via script (From: Robert Poland <email@hidden>)

  • Prev by Date: Play sounds via script
  • Next by Date: Re: Play sounds via script
  • Previous by thread: Play sounds via script
  • Next by thread: Re: Play sounds via script
  • Index(es):
    • Date
    • Thread