Jump to content
Sign in to follow this  
dazza

Listbox - returning the last/selected item

Recommended Posts

dazza

A basic question from a very basic fellow.

I need to know the last item in a listbox. And knowing which is selected would be useful.

ControlGetText("window name", "", "ListBox1") doesn't work, and the Function links give no clue.

I don't have the _listbox_ modules on our builds.

Thanking you in advance

Share this post


Link to post
Share on other sites
Zedna

Look at ControlCommand()

GetCurrentSelection

EDIT: Also look at al _GUICtrlListBox_xxx() UDF functions.

It's in the helpfile at User Defined Functions/GUIListBox management section

for example _GUICtrlListBox_GetCount()

You probably will need also ControlGetHandle()

Edited by Zedna

Share this post


Link to post
Share on other sites
dazza

Thanks for speedy response.

The ControlCommand... GetCurrentSelection returns a zero despite the listbox having a line selected.

And how do I navigate to the 'User Defined Functions/GUIListBox management section' from the www.autoitscript.com site?

Share this post


Link to post
Share on other sites
Zedna

Thanks for speedy response.

The ControlCommand... GetCurrentSelection returns a zero despite the listbox having a line selected.

And how do I navigate to the 'User Defined Functions/GUIListBox management section' from the www.autoitscript.com site?

Download

http://www.autoitscript.com/autoit3/files/....2.10.0-sfx.exe

or

http://www.autoitscript.com/autoit3/files/....10.0-setup.exe

and look at "C:\Program Files\AutoIt3\autoit.chm"

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.