Sign in to follow this  
Followers 0
PerryRaptor

Control over ListBox, LBS_STANDARD

3 posts in this topic

I've been trying to command this ListBox control for a number of years without success. I can command 90% of the other controls within the targeted application, but this one eludes me. So I've stopped by the forums in hopes of getting some ideas.

According to ResHacker, this is how the control is formatted within the application:

CONTROL "", 1058, LISTBOX, LBS_STANDARD | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | LBS_NODATA | LBS_NOSEL | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 68, 328, 196

The AutoIT Info Tool correctly identifies the Control ID Number, and the ClassNameNN as ListBox2.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Are you only using ControlCommand(), or did you try the _GuiCtrlListBox_* UDFs also?

#include <GuiListBox.au3>

$hLB = ControlGetHandle("Your Window Title", "", "[CLASS:LISTBOX; INSTANCE:2]")
If IsHWnd($hLB) Then
    For $i = 0 To _GUICtrlListBox_GetCount($hLB) - 1
        $sText = _GUICtrlListBox_GetText($hLB, $i)
        ConsoleWrite($i & ": " & $sText & @LF)
    Next
Else
    MsgBox(16, "Error", "Failed to get handle from ListBox.")
EndIf

:x

Edit: Add example.

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

SOLVED

I was unaware for this GuiListBox UDF...

Thanks a million ____!

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