Sound scripting not working anymore?

I’ve got a very strange problem. I have scripts that USED to work that now no longer work. I don’t know if something got broken in the 10.4.9 update or what’s going on. The scripts were ones that set volume and muted/unmuted the sound.

If I try:

set volume output volume 50

It replys:

Can't make current appliction into type small real

If I try the (old and deprecated):

set volume 3

It works.

And, if I try to mute the sound with:

set volume with output muted

I get:

Can't make current appliction into type small real

The script:

get volume settings

returns:

{output volume:43, input volume:missing value, alert volume:75, output muted:false}

So I tried getting the current setting and then using output volume along with the muted phrase:

set myVolume to get volume settings
set outputVol to output volume of myVolume
set volume output volume outputVol with output muted

I again get:

Can't make current appliction into type small real

Uh, what’s up?

Hi Kevin,

this is very strange. Regrettably I have no solution, but
on my G5 with 10.4.9 all your snippets work normally

Stefan,

Apparently something was messed up. But I logged out and back in and it works now. How ODD!

(addendum: No it doesn’t. I tried the “mute off” script and it worked, but then I got the System Prefs Sound panel out and was watching it to see if the other scripts work and now they’re all broken again. STRANGE.)

All your snippets work as they should on mm, Kevin with the output volume slider snapping to the new position as I run the script. If I were you, I’d restart and try again, then failing that, I’d toss the pref file for sound.

Restarting had no effect. I looked in my Prefs folder but don’t see anything re: Sound. What do I need to trash to get this working again?

Mine is in /Library/Preferences/com.apple.soundpref.plist. Looks like this:

OK, I see the problem - I don’t HAVE a com.apple.soundprefs.plist file. And changing settings in System Prefs doesn’t create one.

I’ll try checking permissions, maybe that will help.

UPDATE: Apparently it was something in my startup items. I killed everything non-Apple and now it’s working. I’ll have to see what caused the problem.

Hopefully, using add half back, see if problem recurs, add half of what’s left, etc - a binary search.