Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

A recent AVG and Avast antivirus update is preventing DisplayFusion 9.9 from launching on some systems.
If you're running into this issue, please update to the latest DisplayFusion 10.0 Beta.

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