Skip to content

Instantly share code, notes, and snippets.

@dmdeller
Created August 20, 2011 17:40
Show Gist options
  • Save dmdeller/1159393 to your computer and use it in GitHub Desktop.
Save dmdeller/1159393 to your computer and use it in GitHub Desktop.
PowerMate volume scripts
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
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
@thetoolman
Copy link

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 :/

@warpling
Copy link

warpling commented May 4, 2015

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment