Description
The app I’m developing is meant to run remotely. When my bot joins my webinar, it joins as an attendee. When I promote it to a panelist, a popup appears.
The reason I would like my bot to be a panelist is so that it can access raw data from the webinar and display it in the Unity game engine. Is it possible to auto accept this prompt? I have yet to find anything in the sdk that allows me to accept the prompt. Is it possible to join as a panelist instead of an attendee? Thanks.
Which Windows Meeting SDK version?
5.10.3.4884
I got around this issue by using System.Windows.Automation.
using System;
using System.Windows.Automation;
namespace EE_Launcher
{
public static class ZoomAutomation
{
public static void Start()
{
Automation.AddAutomationFocusChangedEventHandler(OnFocusChange);
}
private static void OnFocusChange(object sender, AutomationFocusChangedEventArgs e)
{
AutomationElement sourceElement;
try
{
sourceElement = sender as AutomationElement;
}
catch (ElementNotAvailableException)
{
sourceElement = null;
}
if(sourceElement?.Current.Name.Contains("Zoom") ?? false)
{
SearchAndClickOkButton(sourceElement);
}
}
static void SearchAndClickOkButton(AutomationElement element)
{
var button = element.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.NameProperty, "OK"));
if (button != null)
{
Console.WriteLine("Found OK button.");
var invokePattern = button.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern;
invokePattern?.Invoke();
}
}
}
}