Re: How to play consecutive sounds?
Re: How to play consecutive sounds?
- Subject: Re: How to play consecutive sounds?
- From: Shane Stanley <email@hidden>
- Date: Fri, 02 Oct 2015 16:51:26 +1000
On 2 Oct 2015, at 4:14 PM, Brian Christmas <email@hidden> wrote:
Any advice greatly appreciated.
Really? Then how come you're posting this to the list again: try tell application "Finder" to set my dailyServerFolder to (my serverFolder & ":" & ("Yearly Email Storage " & my theYear as text) & ":" & (my theAddedMonth) & ":" & (my dailyName) as text) on error errmsg number errnum if my runForOz or errnum = 1 then tell application "System Events" to display dialog "Mail Manager Loop Runner setupPrintCoverPage setting dailyServerFolder folder. The Server may not be available. Error " & errmsg & " error number " & errnum & " p = " & p giving up after 10 end try
All you're doing is concatenating some text. Why involve the Finder? And why the try block? And why does the dialog say the server might not be available when the code doesn't check for it? You make it hard for yourself when you leave that cruft in there.
on error errmsg number errnum if my runForOz then say "calling sound” —< says this set my soundCounter to 3 theSound's play() —< plays once
You don't show what happens after this, but you basically want it to end there. If you're going to be calling it from several places, you probably need to set some property that you can query later to see where to branch to in the delegate method. So you might set a property called whatHappened to "serverNotFound" and return, and then in onSound:didFinishPlaying: you would add an an extra "else if whatHappened = "serverNotFound" then".
But really, if you're doing this a lot there's an easier way: find some software, record the glass sound being played four times, and enclose that file in you app.
|
_______________________________________________
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