• 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: playing a sound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: playing a sound


  • Subject: Re: playing a sound
  • From: Mark Douma <email@hidden>
  • Date: Sun, 7 Mar 2004 20:57:46 -0500

On Mar 06, 2004, at 1:23 PM, Michael Grant wrote:

The Finder can "preview" sound files (e.g. aiff) in column view. Is there a way to play specific sound files in a script, without launching iTunes or something? I can't find anything obvious in the Finder or System Events dictionaries.



I wrote this for someone in the MacScripter BBS forums: http://bbs.applescript.net/viewtopic.php?t=6293&highlight=jingle

using terms from application "Xcode"
-- Jingle.applescript
-- Jingle
-- Created by Mark Douma on Sun Jan 18 2004.
-- Copyright (c) 2004 Mark Douma. All rights reserved.
on launched theObject
set the_sound_ to load sound "sound"
play the_sound_
repeat
if playing of the_sound_ = false then exit repeat
delay 1
end repeat
delete the_sound_
quit me
return
end launched

end using terms from

******************************************

http://homepage.mac.com/mdouma46/Jingle.sit (.sitx, ~100 KB)

You can customize the sound you want to play by replacing the default sound that's inside Jingle's application bundle. To do so, select Jingle in the Finder, Control-click on it and choose "Show Package Contents" from the popup menu. In the new window that appears, look inside the /Contents/Resources/ folder for the "sound.aiff" sound file. Take the sound file you'd like to use, rename it to "sound.aiff" and copy it into the /Contents/Resources/ folder, replacing the original one that was there.

The "LSUIElement" of the app (its Jingle.app/Contents/Info.plist actually) to 1 so it runs invisibly, plays the sound and then quits when it's finished.


------------------------------------------------------------------------ ---
Mark Douma
Grand Rapids, MI, USA
email@hidden
http://homepage.mac.com/mdouma46/
------------------------------------------------------------------------ ---
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >playing a sound (From: Michael Grant <email@hidden>)

  • Prev by Date: Re: The other Folder Action handlers
  • Next by Date: Re: Deleting files
  • Previous by thread: Re: playing a sound
  • Next by thread: Text into Mail message content
  • Index(es):
    • Date
    • Thread