• 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: Sierra: sound routine no longer works
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sierra: sound routine no longer works


  • Subject: Re: Sierra: sound routine no longer works
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 10 Oct 2016 10:09:18 +1100

On 10 Oct. 2016, at 2:06 am, Brian Christmas <email@hidden> wrote:

It works only ONCE whether this line is included or not…

its setDelegate:me

Unless you're going to implement delegate methods, that line is pointless.

It looks like a bug to me -- the first sound never actually stops. The easiest fix is to tell it to |stop|() before you tell it to play.

on PlayGlassThree()
set theSoundPlayGlassThree to current application's NSSound's soundNamed:"Glass"
tell theSoundPlayGlassThree
its |stop|()
set theDuration to its duration()
its play()
end tell
current application's NSThread's sleepForTimeInterval:theDuration
say 1
end PlayGlassThree


-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Accessibility
  • Next by Date: Re: Sierra: sound routine no longer works
  • Previous by thread: Re: Accessibility
  • Next by thread: Re: Sierra: sound routine no longer works
  • Index(es):
    • Date
    • Thread