#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <GuilistBox.au3>
#include <Misc.au3>
#include <File.au3>
#include <Array.au3>
#include <String.au3>
#include <Excel.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIEx.au3>
Opt("WinDetectHiddenText", 1) ;0=don't detect, 1=do detect
Opt("WinSearchChildren", 1) ;0=no, 1=search children also
$ttlWindow = "Kundinformation"
$hdlWindow = WinGetHandle($ttlWindow)
;$id = _WinAPI_GetDlgCtrlID($hdlWindow)
$hdlList = ControlGetHandle($hdlWindow, "", 8197)
;MsgBox(0,"",$hdlList)
_GUICtrlListBox_ClickItem($hdlList, 3, "left")
$count = _GUICtrlListBox_GetCount($hdlList)
;MsgBox(0,"",$count)
Global $item
Dim $textArr[0]
For $item = 0 To ($count - 1) Step 1
_GUICtrlListBox_ClickItem($hdlList, $item, "left")
$tlength = _GUICtrlListBox_GetTextLen($hdlList, $item)
$iIndex = _GUICtrlListBox_GetText($hdlList, $item)
MsgBox(64,"",$tlength & " | " & $iIndex)
Next
Hi, I'm trying to get the text from ListBox (selected item) or item looped as the code above, as you can see from the attached file I only get 2 characters for each item, is this a bug or is there something else making it return those 2, GetTextLen seems to be working ok and reads the length.