hanparker Posted October 14, 2014 Share Posted October 14, 2014 (edited) I am a beginner. I can see lots of other beginners have had a problem with ControlClick and I have read those threads - however they don't fix my problem. I have used ControlClick succesfully in Notepad+ to confirm I can use it. I used the following command: WinActivate("[CLASS:Notepad++]","") ControlClick("[CLASS:Notepad++]", "", "[CLASS:ToolbarWindow32;INSTANCE:1]","left",1,14,12) This opened a new document for me - which was the required behaviour. I am now trying to apply this to 3ds Max. I have used the AutoIt window info to get the Class and Instance of the control I am trying to click and I used the ControlClick coords of the button within this control. The script I am trying to run contains the following lines: WinActivate("[CLASS:3DSMAX]","") ControlClick("[CLASS:3DSMAX]", "", "[CLASS:Button; INSTANCE:3]","left",1,73,27) Nothing happens. The 3ds max window gets the focus and then nothing. Here is the image of the Window Info when my mouse is hovering over the button I want to press. Any ideas? Thanks in advance. Edited October 14, 2014 by hanparker Link to comment Share on other sites More sharing options...
Exit Posted October 14, 2014 Share Posted October 14, 2014 (edited) Welcome to the forum Keep it simple. Use ControlClick("[CLASS:3DSMAX]", "", "Button3") Edited October 14, 2014 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
jdelaney Posted October 14, 2014 Share Posted October 14, 2014 A ControlFocus prior to the click sometimes helps, also. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
hanparker Posted October 14, 2014 Author Share Posted October 14, 2014 Thank you for the welcome and help. I tried the "keep it simple" approach but that didn't help. The problem there I think is that it's not just the button that's called Button3. The whole of the area shown in this picture is "Button3" But it's just the actual "Load point cloud" button that I want to press - this doesn't have it's own Instance - hence why I'm using the ControlClick coords. I then tried ControlFocus("[CLASS:Button; INSTANCE:3]","","") before calling ControlClick - but to no avail. Any other thoughts? Link to comment Share on other sites More sharing options...
Solution jdelaney Posted October 14, 2014 Solution Share Posted October 14, 2014 Use my signature to grab all the controls on your window. The 'button' is a grouping. Sometimes the z-order is above that of the controls it groups together, so the window info tool can't see them. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
hanparker Posted October 14, 2014 Author Share Posted October 14, 2014 YES! Get in! Thanks very much. That worked perfectly and now I can press the button. 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