Mute Mac Volume

Posted on
Tue Jun 11, 2019 11:19 pm
koburg offline
Posts: 167
Joined: Jul 27, 2017

Mute Mac Volume

I want to make a Schedule to turn the volume for the Mac running indigodomo down (MUTE) is there any way to do this ?

have tried searching the forum no luck so far.

Posted on
Tue Jun 11, 2019 11:39 pm
koburg offline
Posts: 167
Joined: Jul 27, 2017

Re: Mute Mac Volume

thanks but also want to know how to do it in python

because of what yourself mentioned.

Posted on
Wed Nov 17, 2021 5:28 pm
wideglidejrp offline
User avatar
Posts: 540
Joined: Jan 15, 2012
Location: Danbury, CT

Re: Mute Mac Volume

I have the same need. Anybody find a way to do this?

John R Patrick
Author of
Home Attitude

Posted on
Thu Nov 18, 2021 8:04 am
McJohn offline
User avatar
Posts: 526
Joined: Dec 18, 2012
Location: The Netherlands

Re: Mute Mac Volume

You can do this with a simple external AppleScript (sorry):

Code: Select all
tell application "Finder" to set volume 0


Or via a more complex way:
https://dev.to/kojikanao/control-mac-so ... python-h4g

BTW: we are using Airfoil and the Indigo Airfoil plugin to control all the speakers/volume through the whole house, works perfect.

John

Posted on
Thu Nov 18, 2021 3:32 pm
wideglidejrp offline
User avatar
Posts: 540
Joined: Jan 15, 2012
Location: Danbury, CT

Re: Mute Mac Volume

I don't see how Finder can change the Mac volume. Also, I don't want to use an AppleScript. The other solution you describe may be just what I have been looking for. What I am trying to do is mute my Mac from an action group. I tried to install osascript but it did not work. Also, does osascript support python?

John R Patrick
Author of
Home Attitude

Posted on
Tue Nov 30, 2021 10:45 am
jay (support) offline
Site Admin
User avatar
Posts: 17064
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Mute Mac Volume

There is no built-in way for Python to do this. osascript is also a command line utility that's installed with macOS, and that's probably the best bet. You can call it from python:

Code: Select all
import os
os.system("/usr/bin/osascript -e 'tell application \"Finder\" to set volume 0'")

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests