Jump to content
Sign in to follow this  
ENKI

How do I select all items in a ListBox?

Recommended Posts

ENKI

I have a program that I am trying to automate. It presents a list of options as a ListBox control. I want to select all of the items in the list. I have been trying to get the ControlListView control to work with no luck.

Here is the line I am using:

ControlListView('Probe Statistics Report','','[CLASS:ListBox;INSTANCE:1]','SelectAll')

When I run the script, it does not select anything :mellow: Now if I use the ControlClick control, I get 1 item selected in the middle of the list.

How do I do this??

Thanks in advance for your help.

Share this post


Link to post
Share on other sites
Yoriz

It presents a list of options as a ListBox control.

Here is the line I am using:

ControlListView('Probe Statistics Report','','[CLASS:ListBox;INSTANCE:1]','SelectAll')

Depend on which your using Listbox or ListView as you post shows both there is the udf functions you could try.

_GUICtrlListBox_SelItemRange or

_GUICtrlListView_GetSelectedIndices

Note you have to pass the Hwnd rather then the control id to these functions.


GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.

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  

×