Re: Playing Sounds in AppleScript
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