Code Monkey home page Code Monkey logo

muteactivewindow's Introduction

MAW Logo

MuteActiveWindow

MuteActiveWindow is an AutoHotkey script that allows you to mute the currently active window using a custom hotkey. F1 by default!


This script was inspired by kristoffer-tvera/mute-current-application but was rewritten for svcl because the previous version didn't work for me with the majority of UWP and some other apps.

Table of Contents

Prerequisites

Before using this script, make sure you have the required tools and files in place.

Required Tools

  • AutoHotkey(v1.x): If not already installed, download and install AutoHotkey to run the script.

Additional File (Included in .rar release)

  • Download the svcl.exe(64 bit) tool from here or direct link and place it in the same directory as the AutoHotkey script (MuteActiveWindow.ahk).

Installation

Follow these steps to set up the script:

  1. Clone or download this repository to your computer.

  2. If there is no svcl in directory place the svcl.exe tool in the same directory as the AutoHotkey script (MuteActiveWindow.ahk).

Usage

To mute the active window, use the predefined hotkey (you can customize it in the script). When you press the hotkey, the active window's audio will be muted.

Customize Hotkey

Change the hotkey by editing the "Hotkey.txt" file (located in the /Config directory) and replacing its contents with your desired hotkey (e.g., "F10").

Adding Exclusions

You can configure the script to exclude specific applications from being muted. Exclusions are useful if you want to prevent certain apps from being affected by the script. Here's how you can add exclusions:

  1. Open the ExcludedApps.txt file located in the "Config" folder.

  2. Add the exe's of the applications you want to exclude, each on a separate line, in the following format: You can get UWP exe's with this script from uwp-exe branch link or use CTRL+ALT+P hotkey (on MAW v7.1.0+)

    • For executable files and UWP apps (e.g., Brave.exe, WinStore.App.exe):
      Brave.exe
      Spotify.exe
      
  3. Save the ExcludedApps.txt file.

  4. Reload the script (or press the hotkey if it's already running) for the changes to take effect.

Now, the specified applications will be excluded from the script's muting behavior.

Examples:

Suppose you want to exclude Brave (Brave.exe) and Xbox (Xbox) from being muted. Your ExcludedApps.txt file would look like this:

Brave.exe
XboxPCApp.exe

This will ensure that the script doesn't mute Brave.exe and Xbox when the hotkey is pressed.

Running the Script at Startup

You can choose to run the script at startup either automatically or manually.

Automatic Startup

  1. Run AutoEnableStartup.bat located in the script directory. This batch file will automatically move the required files to the Startup folder for you.

Now, the script will run automatically each time you start Windows without the need for manual intervention.

Manual Startup

  1. Press Win + R to open the Run dialog.

  2. Type shell:startup and press Enter. This will open the Startup folder for the current user.

  3. Create a shortcut to the MuteActiveWindow.ahk script in this folder. You can do this by right-clicking the script file and selecting "Create shortcut," then move the shortcut to the Startup folder.

Now, the script will run automatically each time you start Windows.

Updating Your Script and Pairs

Updating your MuteActiveWindow script or custom executable pairs is now even more convenient with the latest v5.0.0 update:

Automatic Updates

The script will now automatically check for updates on startup, unless you've explicitly disabled this feature in the Config/AutoUpdateCheck.txt file.

Manual Updates

You have two options for manual updates:

Option 1: Right-Click on Taskbar Icon

  1. Right-click on the MuteActiveWindow taskbar icon.
  2. Select "Check for updates" from the menu.

Option 2: Download from GitHub

  1. Visit the MuteActiveWindow GitHub repository.
  2. Navigate to the "Releases" section.
  3. Download the latest version of the script.

License

This project is licensed under the GNU General Public License version 3 (GPL-3.0).

Acknowledgments

muteactivewindow's People

Contributors

tfurci avatar

Stargazers

MrAlucardDante avatar trq avatar  avatar Wybe avatar Zizheng Wu avatar  avatar

Watchers

 avatar

muteactivewindow's Issues

How to set hotkey with modifier e.g. shift+f3?

Thanks for the script. It's working and very nice!

I'm wondering how to set hotkey to e.g. shift+f3

I tried putting

+F3

in hotkey.txt. However, it doesn't seem to work (?) Did I configure anything wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.