Jump to content
Sign in to follow this  
Guest ppp

FindString,SelectString in ComboBox and ListBox

Recommended Posts

Guest ppp


I am new to this AutoIT. Hopefully can someone please help me?

I am trying to use FindString and SelectString commands to find and select the text from ComboBox and a List Box. i am writing a script to test VB.Net application.

FindString/SelectString always returns value "1", it is never selecting the given text in the command.

Here is the code that i am using which is not working....

ComboBox code..........

$db_name =ControlCommand(".Net App", COMBOBOX1", "FindString", 'Test db')

msgbox (0,"domain name", $db_name)

ControlCommand(".Net App", "", "COMBOBOX1", "SelectString", $db_name)

List Box code...........

$name = ControlCommand(".Net App", "", "ListBox", "FindString", 'PROVISIONAL')

msgbox(0, "Application Name", $name)

ControlCommand(".Net App", "", "ListBox", "SelectString", $name)

Can someone tell me what's wrong in the above code???


Share this post

Link to post
Share on other sites
Guest ppp

Actually i am not using "COMBOBOX1" or "ListBox1".

In the original code I am using the names that showed in the AutoSpy

The actual class names shown in the AutoSpy are

ComboBox- autospy.....

Class: WindowsForms10.COMBOBOX.app32

Text: ------(is blank)

ListBox- autospy......

Class: WindowsForms10.SysListView32.app31

Text: ------(is balnk)

FYI.....see attachments

Edited by Jon

Share this post

Link to post
Share on other sites
Guest ppp

Thanks Larry!

I will try to download the unstable version and see if that works!!

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...