I sit in a lot of meetings. I mean a lot. I have been working remote for over 7 years now and as time has gone on I find myself in more and more meetings.  I like to have my mute activated during meetings esp. for ones that I'm just sitting in on.  I grew up playing video games and use chat services like Ventrilo and during gaming sessions it was important to block out all the noise from the keyboards, music and just the audio from the games. To accomplish this I always used push-to-talk.  While applications have gotten much better about blocking some sounds it can still get ugly in even a slightly noisy environment.

So I already liked push-to-talk but I wanted to use that feature with other services like skype, google hangouts, etc.  AutoHotkey to the rescue! Below are the steps you will need to take to make this script work with your systems.  This script will most likely not work if you are just going to copy and paste it, you will need to modify the device id for your microphone and the key binding if you choose.

Step One:

Run this script on your computer. The trick to this is that you will want to set your microphone’s volume to something that is easy to spot and in my case I set the volume to 79%.  This allowed me to find the device and its id quickly.  Here is what my output looks like, yours should be very similar.

image_thumb1

Because I set the volume of my microphone to 79% I could find the device quickly in the output, the settings column, otherwise its kind of a guessing game.  As you can see my device id, mixer column, is 8.

Step Two:

Here is my version of the script; you will need to swap the 8’s in it to be the id of your microphone. If you want to change the key binding you can do that by just changing the two LWin lines with whatever key or key combo you would like to use.

; Default the microphone to muted when this script first runs.
SoundSet, 1, MASTER, mute, 8  ; mute the microphone

; Toggle.
    LWin::
    SoundSet, 0, MASTER, mute, 8  ; unmute the microphone
    SoundBeep, 200, 400
    KeyWait LWin
    SoundBeep, 400, 400
    SoundSet, 1, MASTER, mute, 8  ; mute the microphone

Return

 

Update:

I just tested this on another computer and for some reason the first line of the script, that is trying to default the mic to muted fails to mute the correct device. For whatever reason it was muting my main auto /speakers.  On this computer I just removed that one line and all is well.