Here’s a simple cross-platform script to mute and unmute your system volume. Choose the version based on your operating system.
Windows (using PowerShell)
Save as toggleMute.ps1 and run using PowerShell:
macOS (using AppleScript in Terminal)
Linux (using amixer)
Install alsa-utils if not already installed.
If you want the script in a specific programming language like Python or a GUI button, let me know and I’ll provide that version.
Share this Page your favorite way: Click any app below to share.