diff --git a/app_handling.ahk b/app_handling.ahk index 5e20f6c..8a6511b 100644 --- a/app_handling.ahk +++ b/app_handling.ahk @@ -197,12 +197,19 @@ hideTeamviewerSponsoredsession() { SetControlDelay 0 ControlClick, OK - ; It seems that simply Winclose, ahk_teamviewer doesnt work. - ; I have to actually search for the window and then WinClose the automatically filled variable. - ; Weird... - if WinExist(ahk_teamviewer) { - WinClose + ; Looping a few times here, because TeamViewer sometimes shows multiple windows after dismissing the first + loop, 5 + { + ; It seems that simply Winclose, ahk_teamviewer doesnt work. + ; I have to actually search for the window and then WinClose the automatically filled variable. + ; Weird... + if WinExist(ahk_teamviewer) + { + WinClose + } + Sleep, 300 } + } }