Skip to content

Commit

Permalink
Loop multiple times when closing TeamViewer
Browse files Browse the repository at this point in the history
 It sometimes shows multiple windows after dismissing the first
  • Loading branch information
TheBestPessimist committed Jan 17, 2020
1 parent 879bccf commit 9e08a70
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions app_handling.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}
}

Expand Down

0 comments on commit 9e08a70

Please sign in to comment.