System Volume setting from Studio project

Is there anyway to determine what that system volume is set to?

Thanks,

Maddog

You could use:


set sysVolume to path to startup disk

\ Ulf

Sorry, should have been more specific, I mean volume as in sound level, not disk volume.

Thanks,

Maddog

Maddog,

Jon’s Commands X 3.0d3 includes a command that returns the current system sound volume, as does Extra Suites.

– Rob

I’m having trouble getting the Jons commands stuff to work. Here’s the code snippet:

		set oldVolume to sound volume
		log oldVolume
		set sound volume to 256
		set newVolume to sound volume
		log newVolume
		set theSound to load sound "Submarine"
		play theSound
		set sound volume to oldVolume

From the logs it certainly seems to be getting the system volume (i.e. if I change the volume manually - the number returned changes). But setting the system volume doesn’t seem to do anything.

Any thoughts?

I’m using ApplescriptStudio on Panther (10.3.3)

Maddog

Does it work outside of AppleScript Studio?

– Rob

That specific snippet doesn’t because load sound and play seem to be Applescript studio classes.

I don’t know how to play to a sound outside ASStudio. The jons command:

play sound “some text” doesn’t like the “some text”, not sure what to use there.

I should be more specific here. My question is, if using the Jons commands play cound function, what do I have to play? i.e. how can I create an snd resource, and how do I reference it in the command?

I have no experience in that area so hopefully someone else will offer a solution. Good luck!

– Rob

Thanks for the help so far. My specific problem right now is that I can’t find any sound resources to try and use. I just need to get my hands on some suitable “alert” like .snd files.

Thanks,

Maddog