>Thanks for that but I still can't manage it.
>
>I'm on 10.2.6, I control-clicked PM and selected "Show package contents"
>then contents, MacOS and Powermail additions. There are no sounds in
>there except for a suitcase which will not open. Do I add my sound to the
>'additions' folder, and if so in what format should it be.  Thanks for
>your help.
>
>-- 
>Pat O'Halloran http://www.danu.co.uk  

Not that complicated.  You only need to open the sound suitcase in OS 9,
then add your sounds.  Alternatively, here is an old post from someone
else on this list.  Alas, my notes do not indicate the author.

--Ira

***********
I've written a script that might help OS X users not running Classic to
install sounds in the Additional Sounds suitcase. To run it, you need the
Satimage osax, available for OS X at:

<http://www.satimage.fr/software/downloads/Satimage252.dmg.gz>

To use:

1. Install the Satimage osax (I think it goes in ~/Library/
ScriptingAdditions/ - maybe an actual OS X user can confirm this)
2. Paste the script (watch for line breaks) into your script editor and
save it as an aplet.
3. First drop the Additional Sounds suitcase onto the aplet. This is in
:PowerMail.app:Contents:MacOS:PowerMail Additions:Additional Sounds
4. Drop any single system 7 sound file on the aplet, and that should do it.

Note that I don't use OS X, so I can't guarantee if it works, but it
works great on 9 with the Os 9 version of the osax. I had to increase the
aplet's memory partition to get it to work with big sounds, but I bet
that that isn't an issue on X. At the moment it only processes one file
at a time, 'coz it was easier to write that way (I'm a lazy scripter - if
it works at all. I'm happy ;-). It's also handy for OS 9 users - it saves
finding the suitcase every time. The Os 9 version of the osax is at:

<http://www.satimage.fr/software/downloads/Satimage1.8.5.sit.hqx>

It also comes with the Smile script editor on both OS's (recommended):

Os X:  <http://www.satimage.fr/software/downloads/Smile252.dmg.gz>

OS 8.5/9:  <http://www.satimage.fr/software/downloads/Smile1.8.8US.sit>

--Begin script:

property pmSounds : {}

on open theFile
        set theFile to theFile's 1st item
        set fileInfo to info for theFile
        if fileInfo's name is "Additional Sounds" and fileInfo's file type is
"zsys" then
                set pmSounds to theFile
                display dialog "Drop system 7 sounds on me and I will put them 
in this
suitcase"
                return
        end if
        if pmSounds is {} then
                display dialog "You have to drop the Additional Sounds suitcase 
on me first"
                return
        end if
        set rezList to list resources "snd " from pmSounds
        set iNum to (the last item of rezList) + 1
        set num to the 1st item of (list resources "snd " from theFile)
        set theRez to load resource num type "snd " from theFile
        set rezName to get resource name num type "snd " from theFile
        if my duplicateCheck(pmSounds, rezName) then
                display dialog "There is already a sound with that name"
                return
        end if
        if rezName is "" then set rezName to name of (info for theFile)
        put resource theRez to pmSounds type "snd " index iNum with name rezName
end open

-- This subroutine checks for duplicate sound names:

on duplicateCheck(theFile, theName)
        set idList to list resources "snd " from theFile
        set nameList to {}
        repeat with num in idList
                set rName to get resource name num type "snd " from theFile
                copy rName to the end of the nameList
        end repeat
        return (theName is in the nameList)
end duplicateCheck

--End Script


Reply via email to