Created
March 30, 2012 08:23
-
-
Save bittersweet/2249539 to your computer and use it in GitHub Desktop.
Mute OSX volume with MacRuby and AppleScript
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
framework "ScriptingBridge" | |
def volume(value) | |
volume = "set volume output volume #{value}" | |
applescript = NSAppleScript.alloc.initWithSource(volume) | |
result = applescript.executeAndReturnError(nil) | |
end | |
volume(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment