EDIT:Just rephrasing the question:
Does anyone know how to mute the mic using autohotkey?
Here's why I need it:
Whenever someone walks in my office I have to pause the media player. Sometimes, when I'm watching a video, I also have to mute the headphone speakers. And if I'm on a skype call I have to mute the mic.
I want to assign all those functions to a single hotkey for convienience (probably the "mute" or "play/pause" key) and I'm pretty sure autohotkey can do that, but I don't know how to mute the mic using autohotkey.
Plus, I also want to assign all reverse commands (play and unmute) to a single key (could be a different one or the same one).
(I don't think it matters, but I'm using windows 7)
28 Answers
#z::
soundget, isMute, MICROPHONE, MUTE
if isMute = Off toMute = 1
else toMute=0
SoundSet, toMute, MICROPHONE, MUTE
returnWould toggle the mic's muted state on win&z. Muting master volume would be much the same, except instead of MICROPHONE you would put MASTER, however if it's just your media player you want muting it may be better to set up a hotkey to pause it, rather than mute system volume. Depending on the player it may be able to do it itself, otherwise look into the ControlSend function.
(This has the advantage of not using NirCMD, as while it's a brilliant tool, the ~.5 second disk lag is really annoying to me :()
6I would recommend 'MicMute' utility to mute or unmute the primary microphone using a keyboard. It has a nice taskbar icon, taskbar balloons, and auditory notifications you can modify.
What's awesomer it also let me select my keyboards extended media keys as a shortcut - I choose the button next to my system volume mute.
A microphone muting utility:
Shortcut key is configurable as is the signalling of the current mute state:
Semitransparent corner notifications on all monitors of current mute state. If a corner notification is "in the way" during an online meeting, then the notification can easily be removed by hovering the mouse over it.
you can do this and much more by using NirCMD along with AutoHotKey.
Take a look:
2NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more...
To extend Phoshi's answer, using AutoHotkey and this script can help (Ctrl+F8):
^F8::
SoundSet, +1, MICROPHONE, mute
returnIn my case though, it was the following:
SoundSet, +1, MASTER, mute, 12This might help to get exact audio device configuration:
Very simple:
- Go to your Skype
- Select Tools
- Select option
- Click advance below
- Then click Hotkeys
- Check Enable keyboard shortcuts
- Check mute microphone..and click it
- Then select an additional key you want in muting the microphone.. like CTRL + Z... CTRL + D... any key you want to choose
- Finally, click Save..
I have set ctrl+p to toggle the system sound, for window+z it would be:
#z::Send {Volume_Mute}
Here is a sample AutoHotKey command to use nircmd to mute a mic. You will have to play around with the number at the end, it refers to mic number.
#z:: Run c:\tools\nircmd\nircmd.exe mutesysvolume 2 microphone 2Press Windows + Z to toggle mute.