Re: Summary II: Sounds on OS X
Re: Summary II: Sounds on OS X
- Subject: Re: Summary II: Sounds on OS X
- From: Jon Pugh <email@hidden>
- Date: Tue, 20 May 2003 21:50:47 -0700
At 11:31 AM -0600 5/20/03, Robert Poland wrote:
>
>Couldn't work out how to use Play Sounds from Jon.
>
>
With help from Jon, got this to work.
>
1. Must be out side of tell block.
Not precisely, but the caveats are subtle. You were using a Finder tell block, which definitely doesn't work in this scenario.
>
2. Won't run from "Script Editor" Wonder why that happens?
Same reason. Neither the Finder nor Script Editor have your script's resource file open, which is where the sound is stored.
Conversely, Script Debugger and the example applet I sent you both open the file while running the script, allowing the "play sound" command to find the resource. Script Debugger does this to help you debug applets, and I can attest to its usefulness.
So, you can tell any application to "play sound" if it has a file's resource fork open which contains a sound. In this case, the applet itself has its resource fork open while it runs, so it can play sounds that are stored within itself. In the example applet you could add a tell block for itself if you wanted, and it would still work.
So, it's not the tell block, per se.
Jon
_______________________________________________
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.