Sign in to follow this  
Followers 0
HoratioCane

[Problem][SysListView32] GetText does not work properly

3 posts in this topic

Hi.

I have tried to automate the Nero 9 Essentials Installation. I have succeeded in automating the complete Installation Process with the Aid of a Timeout at the critical Part.

I tried to read the Text "Installation completed" with GetText out of each of the 5 Elements Second Column in the ListView (Row[0-4]Column[2]).

So far I can read the Text of the Elements in the first Column ("DirectX0.9c" etc.), but no Text in the Other Two Columns.

After I researched the Topic a bit, it seems like there is an Issue with "OwnerDrawn" ListView's.

Is there a way to get the Text or to reliably detect the State of those Columns irregardless of the "OwnerDrawn"-Problem?

; Get the Window Handle and Activate it
$handle = WinWait("Nero 9 Essentials - Installation",{...})

If  ($handle <> 0) Then
    WinActivate($handle)
EndIf

; Get the Handle of the ListView Control
$handle = ControlGetHandle("Nero 9 Essentials - Installation",{...},"SysListView321")

; Get the Row-Count
$iCount = _GUICtrlListView_GetItemCount($handle)

; Get the Column-Count
$iColumns = _GUICtrlListView_GetColumnCount($handle)

; Show the Text of all Items in the 1st Column
For $i = 0 To ($iCount - 1)
    MsgBox(0,"Test","Item[" & $i & "]: " & _GUICtrlListView_GetItemImage($handle, $i, 0) & " ")
Next

; Get the first Row completely as an Array
$ary = _GUICtrlListView_GetItemTextArray($handle,0)

; Check if the Array contains the Information
If ($ary[0] <> 0) Then
    ; Try to show the Contents of the Array
    MsgBox(0,"","Text" & $ary[1] & "|" & $ary[2] & "|" & $ary[3])
EndIf

Share this post


Link to post
Share on other sites



Wow! No answers. I'm also investigating how to retrieve text from a SysListView321 class element on Windows 8. If you happen to have an update from these 2.5 years. Let me know.

Share this post


Link to post
Share on other sites

nch,

As the OP has not returned to the forum since he posted that 2.5 years ago, are you seriously expecting an answer? :huh:

Please do not needlessly resurrect old threads like this again - just start a new one of your own. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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