Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Set system volume to 0 AppleScript

This used to work prior to Big Sur:


tell application "Finder" to set volume 0


Is there a change to set volume of system to 0 or mute?

Doesn't seem to work in Big Sur.


Thanks

iMac Line (2012 and Later)

Posted on Jan 1, 2021 4:23 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 1, 2021 5:28 AM

This still works on Big Sur 11.1, as I just watched my sound volume drop to zero when running this:


tell application "Finder" to set volume 0



It inherently enables mute in the Sound Preferences panel. See other uses for set volume.

14 replies

Jan 1, 2021 11:00 AM in response to mrokloricred37

Despite working or not, asking the Finder to do this dates back to about 1995 and is not needed in favor of the standard command 'set volume' which works via Standard Additions (and not via any specific app).


Nowadays (by which I mean the last 15 years or so), leave the Finder to do file-related tasks, and let the OS handle the rest.


In addition, 'set volume' with a single digit is deprecated - it maps back to the early OS versions where volume was on a scale from 0 - 7.

Nowadays, the right way to do it is to use the extended options for set volume, which allows for a scale of 0-100 as well as separate controls for input volume, output volume, alert volume, and a mute toggle (so you don't have to recall what the volume was set to before you muted):


set volume output volume 100 -- lets hear you roar!
set volume output voume 5 -- or be quiet
set volume with output muted -- go silent
set volume without output muted -- revert to previous volume setting

set volume alert volume 100 -- I *really* want to hear alerts

Jan 2, 2021 6:37 PM in response to Camelot

Ah, finally! I believe there is a bug in the sound area. After running the following script:

set volume with output muted


The menu bar shows sound activity yet in sound preferences sound is muted. Indeed the sound is muted despite the menu bar showing activity. The menu bar sound icon should not show activity and the sound preferences show mute !!!


Jan 1, 2021 2:33 PM in response to Camelot

I was doing a bunch of testing. Right now I have an AppleScript with set volume with output muted. I have the sound icon in the menu bar and it is scrolled about halfway to maximum.

When I run the script NOTHING happens to the volume on the sound icon. However,if I scroll the sound icon volume up and down and up (leaving the sound on), the script works.


So it seems to require scrolling up and down to reengage it.

Jan 4, 2021 2:40 PM in response to Camelot

I am running 11.1 and Software Update doesn't offer a 11.2.


This happens on a 2014 MB Pro and a 2019 iMac, with pics. It doesn't always happen. I have toggled the volume with applescript:


using the old:

tell application "Finder" to set volume 50

tell application "Finder" to set volume 30

tell application "Finder" to set volume 0


using various combinations of the above as well as the new language and various combinations:


set volume output volume 100

set volume output voume 5

set volume with output muted


It will work most of the time, but I need it to work all of the time.

Was wondering if there is some shell script for no sound?


Thanks for RSVP



Set system volume to 0 AppleScript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.