This post is a bit obsolete; see Get Microsoft Teams Meeting Window using UIAutomation for the latest.
Notes
The solution is a mixed of previous solution with 2 additional checks based on FindText (I have already used in a previous post)
FindText is used to exclude on-hold meetings (which contains the Resume UI element/button)
And only include windows with the Leave UI element.
The only drawback of the FindText approach is that it activates the window it checks.
That's why I pre-filter before with the previous approach to minimize window flashing/activation.
I am not 100% sure that the FindText approach works for all. (Might depends on screen resolution) and since I do a hard check if the window contains a Leave element, I have added a parameter to switch it off. (TeamsMeetingWinUseFindText). Set it to 0 to deactivate it.
Code is available in /Lib/Teams.ahk -> Teams_GetMeetingWindow (function)
See also this Gist.
No comments:
Post a Comment