Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Remind me to unmute when joining a Teams meeting

Description
Set this script to run on a Trigger for Teams. The script then periodically checks if the window is a meeting and then reminds you to unmute your microphone.
Language
C#.net
Minimum Version
Created By
pragmatick
Contributors
-
Date Created
Mar 1, 2022
Date Last Modified
Mar 1, 2022

Scripted Function (Macro) Code

//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);	
			}	
		}
	}
}