It's currently working in Teams version 1.3.00.30866
Code: Select all
AppsKey::
WinGet, id, list, ahk_exe Teams.exe ;get IDs for all teams windows
Loop, %id% ;Loop through IDs of all teams windows
{
this_ID := id%A_Index%
WinGetTitle, Title, ahk_id %this_ID% ;get the title of the current window
If Title <> Microsoft Teams Notification ;make sure title is not the notification
{
If Title <> ;screen sharing win uses null title, make sure the win does not have a null title
{
WinActivate, ahk_id %this_ID% ;This should be the correct win, activate it
Send, ^M ;send ctrl,shift,m shortcut
break ;There are two teams windows, the main win and the meeting win, break the loop so that the mute commmand doesnt get sent twice
}
}
}
This post helped me put this script together: https www.lprp.fr /2020/03/keyboard-shortcut-to-mute-teams-with-autohotkey/ Broken Link for safety