• 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: Beeping Beeper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beeping Beeper


  • Subject: Re: Beeping Beeper
  • From: Chris Page <email@hidden>
  • Date: Mon, 31 Aug 2009 18:14:07 -0700

On Aug 30, 2009, at 3:23 PM, Luther Fuller wrote:

Using 'beep 2' causes a "beep be" sound. Using just 'beep' results in silence or a short "be” sound.

This is almost certainly due to the sound playing asynchronously and then getting cut off when the script application process ends before the sound has completed. Any process that plays sound asynchronously will encounter this issue, and the solution is to delay quitting until the sound completes.

For example, on my machine the “Funk” beep plays fully, but “Hero” is long enough that the second beep may not finish. To ensure that the sound plays fully, add a “delay 1” (or however long the beep is) after the beep command to ensure it is allowed to completely play before the process ends. You can do this immediately after the beep, or you can define a “quit” handler that always delays before quitting:

beep 2

on quit
delay 1
end quit

Note that if you use “beep” without a parameter, it plays asynchronously. If you give it a number, it will wait for all but the last one to complete before playing the next one.

-- 
Chris Page

 The other, other AppleScript Chris

 _______________________________________________
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

References: 
 >Beeping Beeper (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Weird Characters
  • Next by Date: Re: Weird Characters
  • Previous by thread: Mac OS X 10.6 Snow Leopard security changes for scripting additions (was Re: Beeping Beeper)
  • Next by thread: Re: AppleScript-Users Digest, Vol 6, Issue 400
  • Index(es):
    • Date
    • Thread