Created
August 20, 2011 17:40
-
-
Save dmdeller/1159393 to your computer and use it in GitHub Desktop.
PowerMate volume scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set myVolume to output volume of (get volume settings) | |
set myVolume to (myVolume - 2) | |
set volume output volume myVolume | |
tell application "PowerMate" | |
set aDevice to first device | |
tell aDevice | |
make light state with properties {state type:steady, brightness:(myVolume / 100), name:"Volume"} | |
end tell | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set myVolume to output volume of (get volume settings) | |
set myVolume to (myVolume + 2) | |
set volume output volume myVolume | |
tell application "PowerMate" | |
set aDevice to first device | |
tell aDevice | |
make light state with properties {state type:steady, brightness:(myVolume / 100), name:"Volume"} | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this. I changed the script to +/-1 and it doesnt work for some volume values. Turns out that there are 64 steps in the volume, but that is mapped onto a range of 100 - try setting the volume to 66 - you'll find it get set to 65 :/