Sign in to follow this  
Followers 0
MonsieurOUXX

I don't understand the concept of "Control ID"

4 posts in this topic

Hi all,

I'm a total beginner to AutoIT. I've made a script that uses the coordinates of the controls but I'm not satisfied with it, I'd like to make it more universal, and therefore I'd like to use functions like "ControlCommand" instead of "MouseClick". this is where I encounter issues.

When I run "AutoIt v3 Window Info" and move my mouse over some controls in the application that I wish to automate, the info window displays the *same* ID for several controls. Same thing for the class and Instance. Is it that the guys who made this application didn't design it well and gave the same ID to those controls, or is it that I don't understand what's the ID of a control? Is it because those controls are embedded into a more general control, like a tab or a frame?

I'm confused. The IDs seem to be completely random (2 edit boxes next to each other will have the same ID and class/instance, and another edit box just below will have different ones). See screenshot attached.

Can you help me? Maybe you'll say that I should use the handle, but isn't the handle generated dynamically and doesn't it change every time?

PS : I've tried to search the forum, but I couldn't find appropriate keywords for such a trivial question...

post-48599-1239875119_thumb.jpg

Share this post


Link to post
Share on other sites



It's possible that the controls in the application are completely owner-drawn. This would mean that the only window handle you get is to the overall control and not to what you *think* are controls on there.

Share this post


Link to post
Share on other sites

@MonsieurOUXX

Googling GXWND (the class of your control) proves this not to be an easy task ^_^

Share this post


Link to post
Share on other sites

Googling GXWND proves this not to be an easy task ^_^

Indeed. That external application I'm trying to automate keeps surprising me by how non-standard, crappy and awfully designed it is. Well, at least I can still stick to the MouseClicks.

Thanks for the help.

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