Last active
January 11, 2024 13:08
-
-
Save shoarai/888108b2b83bd7bde95fe3bbdc51017f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F1::toggle_mute_teams() | |
toggle_mute_teams() { | |
winList := WinGetlist("ahk_exe Teams.exe",,,) | |
for window in winList { | |
if (WinGetTitle(window) != "Microsoft Teams Notification" and WinGetTitle(window) != "") { | |
WinActivate(WinGetTitle(window)) | |
Send("^+M") | |
sleep 20 ; sometimes it activates the new window before the sendkeys finishes, delay fixes it | |
break ; mute shortcut works in both windows, so break after first send | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment