Jump to content

FindString,SelectString in ComboBox and ListBox


Guest ppp
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...