autoclose popup like TeamViewer

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
iiooii
Posts: 1
Joined: 09 Aug 2018, 03:02

autoclose popup like TeamViewer

09 Aug 2018, 03:23

hi everyone,
i was look for one easy and light script that close the ugly popups (auto close popup like TeamViewer which really working)
but I didn't find , so wrote it under:
;==================

Code: Select all

Loop:
sleep, 1250

ifWinExist, Sessione sponsorizzata
    {
    ControlClick, OK
        WinClose
    Goto, Label1 
    }

IfWinExist, TeamViewer richiede un aggiornamento
   {
    ControlClick, OK
        WinClose
    Goto, Label1
    }

IfWinExist, Informazioni
   {
    ControlClick, OK
        WinClose
    Goto, Label1
   }

IfWinExist, Uso commerciale
    {
    ControlClick, OK
        WinClose
    Goto, Label1
    }
    
Goto, Loop
gregster
Posts: 8989
Joined: 30 Sep 2013, 06:48

Re: autoclose popup like TeamViewer

09 Aug 2018, 07:52

A few thoughts:

You should think about using a Timer (see SetTimer) instead (although there is even a Loop command available). The use of goto is generally discouraged. It tends to lead to ugly code which is hard to follow.
Also, you should probably add to the script description that, like this, it can only be used with the italian language version of Teamviewer and that window titles will have to be changed for most people.
And finally, there is no label named Label1 in the code you are posted, so the lines containing Goto, Label1 will probably cause syntax errors.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 79 guests