• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
controlling volume levels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

controlling volume levels


  • Subject: controlling volume levels
  • From: Robert Poland <email@hidden>
  • Date: Wed, 30 Jun 2010 15:28:07 -0600

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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: switch to Leopard Š
  • Next by Date: still on that voice over suite
  • Previous by thread: Re: property in script object
  • Next by thread: still on that voice over suite
  • Index(es):
    • Date
    • Thread