mike1234 Posted June 27, 2006 Posted June 27, 2006 I am attempting to reference a control but the id is shared by more than one instance of this control. Is there a way to reference a control based upong position for instance selecting the control with the smallest y coordinate. I tried this using controllistview and and controlgetpos but I could not figure out how to make them work. Any help would be great. Thanks,
Skruge Posted June 27, 2006 Posted June 27, 2006 (edited) Welcome to the forums! Each control must have its own unique ID. Are they overlapped? What is the result of running this code? MsgBox(0, "Class List", WinGetClassList("Your App Title")) Edit: Parenthesis fixed Edited June 28, 2006 by Skruge [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
mike1234 Posted June 27, 2006 Author Posted June 27, 2006 Thanks, I ran it and there are multiple duplicates. hmmm...
Skruge Posted June 28, 2006 Posted June 28, 2006 Each control can be referenced in the classnameNN notation. For example, if your window has multiple Buttons you can access them as "Button1", "Button2", etc... [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
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