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 11:00 AM

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
14 replies
Question marked as Top-ranking reply

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 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



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

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.