I have updated the Teams Shortcuts PowerTool so that now it works also for Teams opened in the browser or a browser app.
I currently use a lot Teams in a specific browser app because I use multiple tenants.
Now I was missing Teams Shortcuts functionalities in it.
Many shortcuts are also implemented in the Browser Web version. So it shall be a low hanging fruit to extend the functionality.
New Teams_IsWinActive function
I have noticed now all Teams windows opened in the browser (or browser app) have the window title ending with " | Microsoft Teams".
So it was easy to check with a RegEx. (don't forget to escape the pipe)
It is also the only way because if you use a Teams Browser App it is not easy to access to the current URL (the address bar is not accessible).
Teams_IsWinActive(){
; Check if Active window is Teams client or a Browser/App window with a Teams url opened
If WinActive("ahk_exe Teams.exe")
return True
SetTitleMatchMode, RegEx
If WinActive("\| Microsoft Teams$")
return True
return false
}
Update in Teams Shortcuts
I have then replaced in TeamsShortcuts.ahk
; ########################## Hotkeys ##########################################
;#IfWinActive,ahk_exe Teams.exe
#If Teams_IsWinActive()
No comments:
Post a Comment