• 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: Playing Sounds in AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Playing Sounds in AppleScript


  • Subject: Re: Playing Sounds in AppleScript
  • From: email@hidden
  • Date: Fri, 30 Oct 2015 08:19:31 -0400

I'm using OS X 10.11.
What was given produces an error, unless I typed it wrong
The message says
Can’t get play of missing value.
What I have is this

use scripting additions
use framework "Foundation"
use framework "AppKit"
set theFile to POSIX path of "Phoenix:Applications:netutils:sounds:logo.mp3"
set theSound to current application's NSSound's alloc()'s
initWithContentsOfFile:theFile byReference:false
tell theSound to play()
Hopefully I didn't type that all incorrectly?

 _______________________________________________
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: Playing Sounds in AppleScript
      • From: Shane Stanley <email@hidden>
References: 
 >Playing Sounds in AppleScript (From: email@hidden)
 >Re: Playing Sounds in AppleScript (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Playing Sounds in AppleScript
  • Next by Date: Re: Playing Sounds in AppleScript
  • Previous by thread: Re: Playing Sounds in AppleScript
  • Next by thread: Re: Playing Sounds in AppleScript
  • Index(es):
    • Date
    • Thread