Sign in to follow this  
Followers 0
Guest ppp

FindString,SelectString in ComboBox and ListBox

3 posts in this topic

Hi,

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

Thanks!!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

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  
Followers 0