Hello Everyone, My name is Pete. I am new to this forum, and to scripting. I am trying to use AutoIt to close the TeamViewer nag screen, then minimize the TeamViewer window on the remote machine upon disconnect. I found the script here. I replaced WinClose("TeamViewer") with WinSetState("TeamViewer", @SW_MINIMIZE, 0), because WinClose causes problems. Now, here is where I need help. The nag screen doesn't show up every time. I would like to check if nag screen exists, if so close it, then minimize the TV window. Also, I wouldn't mind having the script run once instead of a loop, and run it each time I disconnect. Or... even better have the script disconnect TV, close the nag, minimize TV, then end itself. Local $nagHandle = 0
while True
$nagHandle = WinWait("Sponsored session")
if Not ($nagHandle = 0) Then
WinActivate ("Sponsored session")
sleep(3)
Send("{Enter}")
WinSetState("TeamViewer", @SW_MINIMIZE, 0)
EndIf
WEnd