BruceCopperField Posted December 27, 2009 Share Posted December 27, 2009 My appli. is a java applet in browser having a SunAwtCanvas under the Internet Explorer_Server control. I can use MouseClick() to move the mouse and give it a click at my desired position. But when I use ControlClick(), it will only click on the current position of the mouse without moving it to the specified position. Is it a nature of the SunAwtCanvas control that prevent ControlClick() or did I made any miistake?. My test code is here: Opt("WinTitleMatchMode",2);substring Opt("MouseCoordMode", 0) ; relative to active windows WinActivate($title) WinWaitActive($title) sleep(1500) ControlFocus ( $title, "", "[CLASSNN:SunAwtCanvas1]") ; ================================================================================================ ;not working just click on the current mouse position ControlClick ($title, "", "[CLASSNN:SunAwtCanvas1]","left", 1, 216,390) ; ================================================================================================ ; these works!!! ;MouseClick ( "primary" , 135, 417, 1, 11) ;MouseClick ( "primary" , 10, 200, 1, 1) Link to comment Share on other sites More sharing options...
morte Posted January 11, 2010 Share Posted January 11, 2010 I am having the same issue as BruceCopperField, running Autoit 3.3.0.0 - I never used to have this issue until recently - ControlClick() worked without needing to resort to MouseMove() or MouseClick(), but now, even with ControlClick() setting the focus to the correct Window, it does not use the correct coordinates, so I am having to use MouseClick, which is not really an acceptable level of abstraction if controls change their location dynamically in a window with resizing.It does not seem to make a difference which way I express the Control Name, whether as ClassnameNN, or Advanced.It does not seem to matter whether I specify Opt("WinTitleMatchMode",1) or Opt("WinTitleMatchMode",4).I have also noticed that AU3Info seems to be reporting varying Control x,y Coordinates at different times of execution.Lately I have been having to add somewhere around 50 or more pixels to the value reported by AU3Info for MouseClick() events, even after adding Position x,y to ControlClick Coords x,y, and even though the AU3Info Options.Coord Mode is set to Window, not Screen or Client,and I set Opt("MouseCoordMode",0) in my .au3 code.Is this being caused by some recent Windows patch interfering with Windows GUI Mouse Coord events?Hopefully I'm just forgetting to set an appropriate Opt parameter, I cannot think what though... Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 12, 2010 Share Posted January 12, 2010 ControlClick() doesn't move the mouse, it sends a message to the control (or the window if no control is specified). Also, the X/Y coordinates in ControlClick() are always relative to the control itself and do not depend on MouseCoordMode. If you use ControlClick() on a SunAwtCanvas control, the X/Y coordinates will be relative to that control. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
BruceCopperField Posted January 18, 2010 Author Share Posted January 18, 2010 (edited) ControlClick() doesn't move the mouse, it sends a message to the control (or the window if no control is specified). Also, the X/Y coordinates in ControlClick() are always relative to the control itself and do not depend on MouseCoordMode.If you use ControlClick() on a SunAwtCanvas control, the X/Y coordinates will be relative to that control.My description was not accurate enough. Let me clarify the problem a bit. The issue I encountered was the ControlClick() just clicked on the current mouse pointer position regardless of what x,y value I gave it - if the control I am trying to click on is a Java Applet control. Edited January 18, 2010 by BruceCopperField Link to comment Share on other sites More sharing options...
robertakimmell Posted July 5, 2011 Share Posted July 5, 2011 Sorry for replying at old topic but I have same problem with AutoIt. Does anyone know the solution? Please help me Link to comment Share on other sites More sharing options...
bogQ Posted July 5, 2011 Share Posted July 5, 2011 (edited) I know only one java app that is using mouse pos as CC pos is runescape and its probably part of their bot protection. dono if its identical for other java apps newer tested it. So if its game related, dont waits your time and read forum rules http://www.autoitscript.com/forum/forum-6/announcement-13-forum-rules/ Edited July 5, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. 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