Sign in to follow this  
Followers 0
JeffLima

Visual Basic Controls

3 posts in this topic

I apologize if this is a simple question.

I was experimenting with creating a small program in Visual Basic and controlling it with AutoIT, but I was surprised to see that the ControlIDs for the textboxes and buttons change each time I open the test VB application. Is this typical. How can I reference these controls. I want to avoid using the mouse so I don't have worry about position and resizing and whatnot.

Thanks

Jeff

Share this post


Link to post
Share on other sites



Try to use control's ClassNameNN instead of ControlID if it's not changing.

for example Edit1:

ControlSetText("Title", "", "Edit1", "some text to set")

Thanks, that seems to be working.

Jeff

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