On Jul 1, 2010, at 10:58 PM, Kevin Bradley wrote: Robert,
Not sure what you mean by "volume level not very consistent."
Sometimes the mantel sound is at current volume and not at volume determined by SetSoundVolume.app.
The purpose of the extras here is for the Mantel sound (hourly chime) to be the same level regardless of the current sound level setting. It depends entirely on what you are doing. Example, alert sounds are expressed as a percentage of the current volume level. Same with iTunes, it has its own volume slider that operates as a percentage of the current volume. Without knowing what "SetSoundVolume.app" is doing, I'm not sure we can help you.
Functions: Depending time of day, per SetSoundVolumePrefs (nearly mute at night) Option key down - volume down 10 Functions; Command key down - volume up 10 Neither key down do default setting
Kevin Bradley -- The very purpose of existence is to reconcile the glowing opinion we have of ourselves with the appalling things that other people think about us. - Quentin Crisp On Jul 1, 2010, at 2:00 PM, email@hidden wrote: Date: Wed, 30 Jun 2010 15:28:07 -0600
From: Robert Poland <email@hidden>
Subject: controlling volume levels
To: AppleScript Users <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset="us-ascii"
Hi,
I have this script I run every hour (see below). It is intended to get the current volume, set the volume to the value appropriate for the time (SetSoundVolume.app), then return volume to the original value.
OS 10.6.4.
Seems that the volume level is not very consistent, I suppose depending on what else is going on.
Is there something I could do to get around this.
Critique appreciated.
-- Script
(* playMantelSound - 7/30/04
*)
set mantelSound to (path to documents folder as string) & "clutter:Sounds:mantel" as alias
tell (get volume settings) -- this line is more for a record for future ref.
set {a, b, c, d} to {output volume, input volume, alert volume, output muted}
end tell
--> {50, 50, 100, false}
set currentVolume to a
run script POSIX file "Library/Scripts/Universal Scripts/SetSoundVolume.app" as alias
ignoring application responses
tell application "Play Sound" to play mantelSound
delay 3
end ignoring
-- reset volume to previous value
set soundVolume to currentVolume
set volume output volume (soundVolume)
tell application "Play Sound" to quit
-- end script
Robert Poland - Fort Collins, CO
Robert Poland - Fort Collins, CO
|