Jump to content

mellopete

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by mellopete

  1. Thanks UEZ. However it doesn't close the window for me. Just to be clear, this is for the remote side. When I remote in with TV it leaves the nag and window open on the remote computer once I disconnect.
  2. 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
×
×
  • Create New...