Jump to content
Sign in to follow this  

Getting the currently selected value from a combobox in an existing program

Recommended Posts

Hi there, this is my first post to these forums. I've just started using AutoIt to automate UI testing of an existing software application and am running into a problem reading the currently selected value from a few ComboBoxes on one of the application screens.

The existing application is written in C# using visual studio and I am able to read the source code.

So here's the situation:

I have three ComboBoxes on a screen, and I would like to get the currently selected value in each box.

When I use AutoIt Window Info to get the ControlID Name, I get "button" for all three.

If they each had a distinct ControlID I could use:


to get the text. In fact, if I use "[NAME:button]" in the above command, I get the text on one of the buttons. But I cannot figure out how to get the text from the other two buttons. I have also tried using

"[CLASS:Button; INSTANCE:15]"
as the ControlID in ControlGetText, but that does not work either.

For another function I have used

to successfully get the position of the different comboboxes, but referencing the internal C# object name does not seem to work with ControlGetText.

Thanks for your help!

Edited by dj1

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...