• 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
How to play a system sound without third-party OSAXen
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to play a system sound without third-party OSAXen


  • Subject: How to play a system sound without third-party OSAXen
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 15 Feb 2001 08:25:11 -0800

You can't play sounds from Applescript without third party extensions.
However, you can do this:

try
play(aa)
on error
set aa to choose file with prompt "choose the sound to play." of type
{"sfil"}
play(aa)
end try

try
play(bb)
on error
set bb to choose file with prompt "choose the sound to play." of type
{"sfil"}
play(bb)
end try

on play(fileToBePlayed)
tell application "Finder" to open fileToBePlayed
end play

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: Re: Re-Re-Repeat With question (newbie level)
  • Next by Date: Re: Accessing a Record by variable--"the" solutions
  • Previous by thread: Re: Calling an Application - Again
  • Next by thread: Re: Accessing a Record by variable--"the" solutions
  • Index(es):
    • Date
    • Thread