Jump to content

Recommended Posts

Posted

Hi everyone, I found I cant fetch the text of listview for one specific application page as attached screen even I tried many ways and failed finally, could you please help me check why?

The strange thing is that, this code is able to fetch the correct text of listview on some my colleagues' PC but failed on my PC and I checked the application bit, they are same.

And I can  fetche the text of list view of other applications only can't for this one on my own pc with same code.

And I can get the column count and select row of list view for the specific one but can't get the text, so sad, please help me, really appreciate.

 

#include <GuiComboBox.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiListBox.au3>
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <Array.au3>
#include <ListViewConstants.au3>
#include <GuiListView.au3>

Example()

Func Example()
   Local $sWindowName = "969275421 - MSL - Active"

   If WinExists($sWindowName) Then
      WinActivate($sWindowName)
      ;WinWaitActive($sWindowName)
   ;   send("{F3}")
   ;   Sleep(100)
      $classDetails = "[CLASS:SysListView32; INSTANCE:1]"
      $hLV = ControlGetHandle($sWindowName, "", $classDetails)
      $iRows = _GUICtrlListView_GetItemCount($hLV)
      ;MsgBox(0,"",$iRows); can get the item number
      ConsoleWrite($sWindowName)
      MsgBox(0,"",ControlListView($sWindowName,"",$classDetails, "GetItemCount")); result: 11

      MsgBox(0,"",ControlListView($sWindowName,"",$classDetails, "GetText",1,1)) ; result: SysListView32

      $res = _GUICtrlListView_GetItemTextArray($hLV,1)

      _ArrayDisplay($res); can't get the text only show blank as screen

    EndIf
EndFunc

 

autoit_listView_screen.PNG

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
×
×
  • Create New...