//Started by a trigger for a new teams window. Then periodically checks if the window is a meeting
//and then reminds me to unmute my microphone.
using System;
using System.Drawing;
using System.Threading;
// The 'windowHandle' parameter will contain the window handle for the teams window
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
String text = BFS.Window.GetText(windowHandle);
if (text == "New Window | Microsoft Teams")
{
for (int i = 0; i<15; i++)
{
text = BFS.Window.GetText(windowHandle);
if (text == null || text == "") {
break;
}
if (text.StartsWith("Meeting")) {
BFS.Dialog.ShowMessageInfo("Mikro hochklappen!");
break;
}
Thread.Sleep(500);
}
}
}
}