0

I am using AutoHotkey to (un-)mute teams calls (OS: Win10Enterprise).
The code looks like that:

LControl & LWin::
;#HotkeyInterval 200

Send ^
WinGet, active_id, ID, A
SetTitleMatchMode, 2
;DetectHiddenWindows, On
WinGet, fensterID, List, ahk_exe Teams.exe
Loop, %fensterID% { ; will run loop for number of windows in array
  WinActivate, % "ahk_id " fensterID%A_Index%
  Send ^+m
}
SoundBeep, 200, 100
WinActivate, ahk_id %active_id%
Return

It loops through all processes called "Teams.exe" and sends the teams-internal Ctrl+Shift+M command. The problem here is, that the call window is always overlayed by later activated teams windows (main chat window), which annoys me. I'd like to solve this, by finding the actual windows process, that is the video call/ contains the video call window.

I found this solution, especially the link to the Get call API. But I have no clue if the given threadID is the one I am looking for.

Any advice on this id or a better solution to (un-)mute teams calls?

Robert
  • 652
  • 2
  • 11
  • 23
  • Could you please check these docs if it helps you in any way: https://learn.microsoft.com/en-us/graph/api/call-unmute?view=graph-rest-1.0&tabs=http https://learn.microsoft.com/en-us/graph/api/call-mute?view=graph-rest-1.0&tabs=http – Prasad-MSFT Mar 10 '22 at 12:46
  • Not really. Possibly I could use this to unmute calls, but as the note at the top says only for groupcalls and I would have to build the entire software around it before... More hassle than I am willing to suffer. Thanks though – Robert Mar 11 '22 at 07:47
  • 1
    Those were the ways available for mute/unmute using Graph API. Apart from that couldn't find any other way – Prasad-MSFT Mar 14 '22 at 08:17

1 Answers1

1

This is a bit tricky to get the current meeting window. The best solution I have found is explained here.

See code in GitHub the Teams Library here

Thierry Dalon
  • 779
  • 5
  • 21
  • This is awesome!! Can you elaborate a little more on what a leave- or restore-element is and where you look for it? I find the ahk syntax insanely complicated and disturbing... – Robert Mar 15 '22 at 11:10