# HG changeset patch # User Atul Varma # Date 1269724470 25200 # Node ID e5402ead03077e18cfb684fd4e5dbcfd0eb2d242 # Parent 4285e37bea696cae9ce197f82c2fec056b540f76 Added mute and unmute diff -r 4285e37bea69 -r e5402ead0307 my-enso-commands.py --- 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: