Sign in to follow this  
Followers 0
mike1234

Control instances

4 posts in this topic

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,

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Skruge

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

Thanks,

I ran it and there are multiple duplicates. hmmm...

Share this post


Link to post
Share on other sites

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]

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