WillPower Posted March 7, 2011 Share Posted March 7, 2011 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 Link to comment Share on other sites More sharing options...
jvanegmond Posted March 7, 2011 Share Posted March 7, 2011 a popup notification appears on the computer being remotely accessed.Your code looks good. But how have you verified this? It could be that the popup appears on the computer you are using to access the other computer. In that case, it would make no sense to run the script on the remote computer. And vice versa. Many applications use hidden windows, your script may be detecting a hidden LogMeIn window and closes it. This results in some, for you, unpredictable results while the script is working perfectly fine. github.com/jvanegmond Link to comment Share on other sites More sharing options...
WillPower Posted March 7, 2011 Author Share Posted March 7, 2011 Your code looks good. But how have you verified this? It could be that the popup appears on the computer you are using to access the other computer. In that case, it would make no sense to run the script on the remote computer. And vice versa. Many applications use hidden windows, your script may be detecting a hidden LogMeIn window and closes it. This results in some, for you, unpredictable results while the script is working perfectly fine.Just to add some clarification, the popup appears on the computer being remotely accessed (in this case, my desktop). As I'm testing my script, i have both computers in front of me, and the script is running on the remotely accessed computer (desktop). the WinList function returns a list of all active, visible windows. When the popup is present, WinList returns a record for it. When it's not present, WinList doesn't have a record for it. So I'm pretty sure that the popup is that window. When I run the same script to close notepad or calculator.. it works fine. It's just this popup that doesn't close as it's supposed to. Very frustrating. Link to comment Share on other sites More sharing options...
Cars0n66 Posted March 7, 2011 Share Posted March 7, 2011 Just to add some clarification, the popup appears on the computer being remotely accessed (in this case, my desktop). As I'm testing my script, i have both computers in front of me, and the script is running on the remotely accessed computer (desktop). the WinList function returns a list of all active, visible windows. When the popup is present, WinList returns a record for it. When it's not present, WinList doesn't have a record for it. So I'm pretty sure that the popup is that window. When I run the same script to close notepad or calculator.. it works fine. It's just this popup that doesn't close as it's supposed to. Very frustrating.something in windows 7 OS is not allowing you to.your script works great in XP OS but win7 is no go. Link to comment Share on other sites More sharing options...
WillPower Posted March 7, 2011 Author Share Posted March 7, 2011 something in windows 7 OS is not allowing you to.your script works great in XP OS but win7 is no go.Ahhhh!! So what is it in Win7 that causes it to not work? Link to comment Share on other sites More sharing options...
Cars0n66 Posted March 9, 2011 Share Posted March 9, 2011 (edited) dude i honestly cant say what gives. Obviously autoit is not able to close the logmein window. there needs to be a workaround for the winclose, that would be my guess. Edited March 9, 2011 by Cars0n66 Link to comment Share on other sites More sharing options...
jvanegmond Posted March 10, 2011 Share Posted March 10, 2011 logmein window probably simply disobeys kill command. You can try hiding the window via: WinSetState and @SW_HIDE. github.com/jvanegmond Link to comment Share on other sites More sharing options...
WillPower Posted March 10, 2011 Author Share Posted March 10, 2011 logmein window probably simply disobeys kill command. You can try hiding the window via: WinSetState and @SW_HIDE.Unfortunately, that doesn't work either. Link to comment Share on other sites More sharing options...
programer Posted March 15, 2011 Share Posted March 15, 2011 http://truquesemanhas.blogspot.com/2009/03/como-deixar-o-logmein-invisivel.htmlit´s in portuguese. if u cant understand, tell me, and i´ll try to translate do english. Link to comment Share on other sites More sharing options...
Cars0n66 Posted March 22, 2011 Share Posted March 22, 2011 (edited) on that Portuguese website it doesn't work with the updated logmein. what they have you do is delete certain files from the logmein dll. it seems that you would need a 2009 version of logmein for it to work. that was when the article was posted. where are you going to find one of those. a bigger question is will the 2009 version even run if found and install as if it was the newly updated versions do. Edited March 22, 2011 by Cars0n66 Link to comment Share on other sites More sharing options...
willichan Posted March 22, 2011 Share Posted March 22, 2011 The logmein popup has a little 'x' in the corner of it. Can you simulate a mouse click to close it? My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
jorolino Posted March 22, 2011 Share Posted March 22, 2011 Try this expandcollapse popup;simple script While 1 ;==>start loop Sleep(1000) ;==> check every 1 sec $i = 0 Do Sleep(1000) $click = _clickButton("LogMeIn",XXX ,XXX ) if $click = 1 Then $i = 1 Else $i = 0 EndIf Until $i = 1 ;==> exit loop only if is cliked to btn exit and etc WEnd ;==> endloop ;func to click button ;return 0 if error and 1 if success ;$title = window title , $cordx is a diffrence between position on window x and xcord for mouse click ;$cordy is a diffrence between position on window y and ycord for mouse click Func _clickButton($title, $cordx, $cordy) $pos = WinGetPos($title, "") $xpos = $pos[0] $ypos = $pos[1] $difx = $cordx $dify = $cordy $xclick = $xpos + $difx $yclick = $ypos + $dify WinActivate($title, "") Sleep(2000) MouseClick("left", $xclick , $yclick ,1, 0 ) Sleep(2000) if WinExists ($title, "") Then Return 0 Else Return 1 EndIf EndFunc With little modification you can expand program. Link to comment Share on other sites More sharing options...
Cars0n66 Posted March 24, 2011 Share Posted March 24, 2011 Try thisI'm using win 7 x32 and jorolino when i use your script it has a error it says Line 10 $click = _clickbutton("LogMeIn","xxx,xxx) Error: Error parsing function call. one thing i did notice was that the logmein box which pops up when a remote user is loges in. I used the AutoIt window-info it looks like the X to close the window is button 1. but one delema is i cant figure out how to script it to control click with out being able to use the macro recorder. Link to comment Share on other sites More sharing options...
dufran3 Posted March 24, 2011 Share Posted March 24, 2011 I'm using win 7 x32 and jorolino when i use your script it has a error it says Line 10 $click = _clickbutton("LogMeIn","xxx,xxx) Error: Error parsing function call. one thing i did notice was that the logmein box which pops up when a remote user is loges in. I used the AutoIt window-info it looks like the X to close the window is button 1. but one delema is i cant figure out how to script it to control click with out being able to use the macro recorder.ControlClick? Link to comment Share on other sites More sharing options...
jorolino Posted March 28, 2011 Share Posted March 28, 2011 I'm using win 7 x32 and jorolino when i use your script it has a error it says Line 10 $click = _clickbutton("LogMeIn","xxx,xxx) Error: Error parsing function call. one thing i did notice was that the logmein box which pops up when a remote user is loges in. I used the AutoIt window-info it looks like the X to close the window is button 1. but one delema is i cant figure out how to script it to control click with out being able to use the macro recorder.Ofc you need to change xxx,xxx with xcord and ycord.First start the Autoit window info , get the info for window "LogMeIn" position mouse in X(close window)is something like this>>>> Window <<<<Title: LogMeInClass: Position: 310, 289Size: 404, 152Style: 0x94C801C5ExStyle: 0x00010101Handle: 0x000400BC>>>> Control <<<<Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<<Position: 570, 303Cursor ID: 0Color: 0xA4A4A4>>>> StatusBar <<<<>>>> ToolsBar <<<<>>>> Visible Text <<<<>>>> Hidden Text <<<<Now need this 2 things 1. Position: 310, 289>>>> Mouse <<<<2. Position: 570, 303so Mouse position x 570 - window position 310 = 260and Mouse position y 303 - window position y 289 = 14input in the xxx$click = _clickbutton("LogMeIn",xxx,xxx)$click = _clickbutton("LogMeIn",260,14)and program works Link to comment Share on other sites More sharing options...
thewolfe Posted July 28, 2011 Share Posted July 28, 2011 I just saw this post on LMI. This may be off the subject but here's my post from a couple of days ago if you can help. If someone has the script, I have a friend who may be able to help me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now