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:
Func DoesLMIExist() $var = WinList() For $i = 1 to $var If $var[$i] = "LogMeIn" Then ;;;;; The msgbox below appears just fine MsgBox(0, "Details", "Title=" & $var[$i] & @LF & "Handle=" & $var[$i])
;;;;; None of the below commands are successful in closing the popup WinKill($var[$i]) WinKill($var[$i]) WinKill("LogMeIn") WinClose($var[$i]) WinClose("LogMeIn") EndIf Next EndFunc
The scripts work fine in Windows XP but not on Windows 7. Can anyone help?
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)