Mute the microphone in GoToMeeting using a hotkey and AutoHotKey

My favorite Windows desktop automation utility is AutoHotKey. I use it to fix a variety of annoyances and add functions to applications that I wish the original authors had seen fit to add.

I like being able to mute my microphone quickly using a hotkey combination when using a voice chat app. We use GoToMeeting at work. GoToMeeting doesn’t seem to provide any hotkey capabilities for common operations like muting the microphone.

When in use, the Windows GoToMeeting client presents a control interface that contains common controls like mute/unmute, webcam and screen sharing. It looks like this:

GoToMeeting UI

I tried to use the WindowSpy utility that comes with AutoHotKey to get the window and control information for that microphone mute button. However, it doesn’t appear that the mute button is a gettable control.

So I’ll use AutoHotKey’s ControlClick command to click the microphone mute button for me using X,Y coordinates relative to the window container.

Below is my AHK snippet, which I place within my general AutoHotKey.ini file. It maps Ctrl-Alt-X to click that button. Ctrl-Alt-X is a keyboard combo that I can strike one-handed, but which I won’t accidentally invoke otherwise. You can map it to whatever keyboard combination you like.

I admit the solution is brittle. If GoToMeeting changes their UI such that the coordinates of the mute button change, this will break.  They’ve done it before.

Then again, mapping AHK to window and control IDs isn’t exactly rock solid anyway, so these kinds of fixup scripts are always a little brittle.

Enjoy!

; Ctrl-Alt-x toggles mute in GoToMeeting
^!x::
; SetControlDelay is recommended by AHK to
; improve reliability by avoiding holding
; the mouse button down during the ControlClick.
SetControlDelay -1
; Specifying NA avoids marking the target
; window as active and avoids merging its
; input processing with that of the script, yada yada. RTFM.
ControlClick, X50 Y25, ahk_class G2WShareActionButtons,,,, NA
return
Advertisements