As of 10.3 the volume command seems to have changed somehow. “Set volume 7” sets the system volume to about 70 % on my PB 12", and that’s as far as it goes. Has anyone else noticed this odd behaviour? Bug or part of the design?
What does the Standard Additions dictionary say in 10.3? In 10.2.8 it reads…
And
set volume 7
max’s the volume to 100% in AppleScript 1.9.1.
Same, same…
Using the below AS I found the following totally wierd returns from Panther
Copy, paste in Script Editor & run to see a list of volume input/returns from 0 to 10 in 0.1 increments - so what’s with this? :shock: ?
(*
return points
<4.5 = 19
4.5 = 22
5 = 26
5.5 = 31
6 = 43
4.5 = 50
7 = 70
7 = 70
*)
tell application “System Events”
set UserHome to (home directory of current user) as string
end tell
tell application “Extra Suites”
set UserHomeMACString to replace “/” in UserHome with “:”
end tell
set volume 0
set CurrentVolume to sound volume
set VolumeList to {}
set DisInput to 0
set AppleScript’s text item delimiters to “”
repeat 100 times
set volume DisInput
set DisInput to DisInput + 0.1
set DisReturn to sound volume
set VolumeList to VolumeList & ((DisInput & " = " & DisReturn) as string) as list
end repeat
set AppleScript’s text item delimiters to return
set VolumeListString to VolumeList as string
set handle to open for access file (UserHomeMACString & “:VolumeList.txt”) with write permission
set eof handle to 0
write VolumeListString to handle
close access handle
error number -128
Hi,
I stripped down your code to this (both scripts require “Jon’s Commands” osax):
set volume 0
set VolumeList to {}
set DisInput to 0
set AppleScript's text item delimiters to ""
repeat 100 times
set volume DisInput
set DisInput to DisInput + 0.1
set DisReturn to sound volume
set VolumeList to VolumeList & ((DisInput & " = " & DisReturn) as string) as list
end repeat
return VolumeList
I don’t find this weird, since max volume is 7, i.e. 70 is the highest value that can be returned by the script. The result returned after changing the loop line to
repeat 70 times
reflects the entire sound volume range. What I do find weird (in Panther) is that the actual audio output is only set to 70 % (as seen in System Preferences Audio pane) when you use standard additions “set volume 7” (while using Jon’s “set sound volume to 256” max’s the output volume to 100 %), making any Applescript using the “set volume” command behave differently in Mac OS X 10.2 and 10.3.
So… in layman’s terms please, how do I set my system volume to full while in Panther?
Up?
Thomas,
Reply doesn’t appear to work on Apple’s forum at the moment so I’ll reply here instead. The latest version (Feb 9) of Extra Suites http://www.kanzu.com/ will adjust volume properly in Panther, ie. up to 100%. It also has many other useful AppleScript commands so is well worth checking out. I presume Apple will fix the volume issue at some point, maybe in 10.3.3?
Great - I’ll take look at this. Thanks.
I suggest you all report this to Apple. I have, and I believe more reports will increase the chances of a fix for this issue being nominated for an OS release.
Cheers,
Jonas