Sign in to follow this  
Followers 0
hanparker

ControlClick problem

6 posts in this topic

#1 ·  Posted (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. controlclick.jpg
 
Any ideas? Thanks in advance.
 
 
Edited by hanparker

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Welcome to the forum

Keep it simple. Use ControlClick("[CLASS:3DSMAX]", "", "Button3") :thumbsup:
 

Edited by Exit

My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

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"

button3.jpg

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

YES! Get in!

Thanks very much. That worked perfectly and now I can press the button.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0