Continuing the discussion from How Do I Select "Favorites" on Emoji & Symbols Window?:
Thanks to Jonas (@ionah) for his script:
I’ve done some research and refactored that into a handler:
use framework "Foundation"
# use framework "Foundation"
Searches for sound file in these locations, in this order:
application's bundle, ~/Library/Sounds, /Library/Sounds, /Network/Library/Sounds, /System/Library/Sounds
Choices from /System/Library/Sounds Folder:
Basso, Blow, Bottle, Frog, Funk, Glass, Hero,
Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink
local oSound, curVol, oNSSound
set oSound to (current application's NSSound's soundNamed:pSoundNameStr)
### How do I get CURRENT Sound Volume, so I can restore? ###
-- I tried oSound's getVolume, but that did NOT work
Any ideas on how to get the current sound volume?