• 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: Robert Poland <email@hidden>
  • Date: Sun, 03 Mar 2013 10:07:01 -0700

On Mar 3, 2013, at 9:52 AM, Luther Fuller <email@hidden> wrote:

> On Mar 3, 2013, at 10:24 AM, Robert Poland wrote:
>
>> if I run;
>>
>> set soundPath to (path to documents folder as string) & "clutter:Sounds:mantel.aiff" as alias
>> do shell script "afplay " & soundPath & " &> /dev/null & echo $!" -- start the music
>>
>> I get a console "60641" and no sound.
>
> You need to insert:
> set soundPath to (quoted form of (posix path of soundPath))
>
> If you do 'afplay -h' in the Terminal, you will get some options you can't see elsewhere.

I ended up with;

set soundPath to (quoted form of (POSIX path of (path to documents folder as string) & "clutter/Sounds/mantel.aiff"))
set soundpid to do shell script "afplay " & soundPath & " &> /dev/null & echo $!"

I'll try that tomorrow and see if the "New" machine can handle it.

Thanks all,

Robert Poland - Fort Collins, CO




 _______________________________________________
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

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

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