Mercurial > my-enso-commands
changeset 9:e5402ead0307
Added mute and unmute
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sat, 27 Mar 2010 14:14:30 -0700 |
parents | 4285e37bea69 |
children | 10e73bb57b01 |
files | my-enso-commands.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/my-enso-commands.py Sat Mar 27 12:51:29 2010 -0700 +++ b/my-enso-commands.py Sat Mar 27 14:14:30 2010 -0700 @@ -130,6 +130,18 @@ ensoapi.display_message("png size: %d bytes. jpg-90 size: %d bytes." % (png_size, jpg_size)) +def cmd_mute(ensoapi): + """mute the speaker.""" + + _runAppleScript('set volume output muted true') + ensoapi.display_message("Speaker muted.") + +def cmd_unmute(ensoapi): + """unmute the speaker.""" + + _runAppleScript('set volume output muted false') + ensoapi.display_message("Speaker unmuted.") + def cmd_unupload_image(ensoapi): url = ensoapi.get_selection().get("text", "") if url: