MonsieurOUXX Posted April 16, 2009 Share Posted April 16, 2009 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... Link to comment Share on other sites More sharing options...
WideBoyDixon Posted April 16, 2009 Share Posted April 16, 2009 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. [center]Wide by name, Wide by nature and Wide by girth[u]Scripts[/u]{Hot Folders} {Screen Calipers} {Screen Crosshairs} {Cross-Process Subclassing} {GDI+ Clock} {ASCII Art Signatures}{Another GDI+ Clock} {Desktop Goldfish} {Game of Life} {3D Pie Chart} {Stock Tracker}[u]UDFs[/u]{_FileReplaceText} {_ArrayCompare} {_ToBase}~ My Scripts On Google Code ~[/center] Link to comment Share on other sites More sharing options...
ResNullius Posted April 16, 2009 Share Posted April 16, 2009 @MonsieurOUXXGoogling GXWND (the class of your control) proves this not to be an easy task Link to comment Share on other sites More sharing options...
MonsieurOUXX Posted April 16, 2009 Author Share Posted April 16, 2009 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. 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