• 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: How to play consecutive sounds?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to play consecutive sounds?


  • Subject: Re: How to play consecutive sounds?
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 02 Oct 2015 14:34:22 +1000

Try to avoid loops with delays in them where possible. 

property soundCounter : 0

on applicationWillFinishLaunching:aNotification
set theSound to current application's NSSound's soundNamed:"Glass"
theSound's setDelegate:me
set my soundCounter to 4
theSound's play()
end applicationWillFinishLaunching:

on |sound|:theSound didFinishPlaying:someBool
set soundCount to my soundCounter
set my soundCounter to soundCount - 1
if soundCount > 0 then
theSound's play()
else
my initializingRoutineTwo()
end if
end |sound|:didFinishPlaying:


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

 _______________________________________________
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

  • Follow-Ups:
    • Re: How to play consecutive sounds?
      • From: Brian Christmas <email@hidden>
References: 
 >How to play consecutive sounds? (From: Brian Christmas <email@hidden>)

  • Prev by Date: How to play consecutive sounds?
  • Next by Date: Re: How to play consecutive sounds?
  • Previous by thread: How to play consecutive sounds?
  • Next by thread: Re: How to play consecutive sounds?
  • Index(es):
    • Date
    • Thread