Reply
New Contributor
willpower
Posts: 3
0

AutoIt Script for LogMeIn Not Working - Close Popup Notification

When remotely accessing my home desktop with LogMeIn, a popup notification appears on the computer being remotely accessed. I wrote an AutoIt script to automatically close this little popup, but it doesn't work! When i call WinList() it returns the title ("LogMeIn") and handle of the popup just fine, but none of the usual AutoIt commands seem to work on it (WinKill, WinClose, etc). Any help would be greatly appreciated.

Here is my original script:

Opt("TrayIconHide", 1)
Opt("WinTitleMatchMode", -2)
$i = 0
Do
   WinWait ("LogMeIn")
   Winkill ("LogMeIn")
Until $i = 1


When the above didn't work, I tried a fancier script:

Opt("TrayIconHide", 1)
Opt("WinTitleMatchMode", -2)

$i = 0
Do
   DoesLMIExist()
Until $i = 1

Func DoesLMIExist()
    $var = WinList()
    For $i = 1 to $var[0][0]
        If $var[$i][0] = "LogMeIn" Then
            ;;;;; The msgbox below appears just fine
            MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1])

            ;;;;; None of the below commands are successful in closing the popup
            WinKill($var[$i][0])
            WinKill($var[$i][1])
            WinKill("LogMeIn")
            WinClose($var[$i][1])
            WinClose("LogMeIn")
        EndIf
    Next
EndFunc

 

 

The scripts work fine in Windows XP but not on Windows 7. Can anyone help?


Thanks!

New Contributor
willpower
Posts: 3
0

Re: AutoIt Script for LogMeIn Not Working - Close Popup Notification

Anybody? I'm sure this is affecting more than just me.

New Contributor
temporary
Posts: 2
0

Re: AutoIt Script for LogMeIn Not Working - Close Popup Notification

It's maybe too late but, I've seen any people say that Winkill or WinClose doesn't work on windows 7.

Here is a little script that hopefully will help you someday you want to close something automaticly:

$title = 'Untitled - Notepad' ;It seems that the title is case sensitive (I don't know if the popup notification have a tile and it's a variable for easy editing
Run(@ComSpec & ' /c ' & 'notepad.exe', '', @SW_HIDE)
WinWait($title)
WinActivate($title);you would insert all this in a loop after the winwait
Send ("this will cloes in 2000ms")
Sleep(2000)
 
WinClose($title)
Send ("n") ;this will cloes the dialog without saving
WinWaitClose($title)

I hope this helps you in some way someday.

New Contributor
temporary
Posts: 2
0

Re: AutoIt Script for LogMeIn Not Working - Close Popup Notification

the loop would looke like that


$title = 'Untitled - Notepad'
$i = 0
Do
 WinClose($title)
Until $i = 1