SmileHe Posted July 10, 2019 Posted July 10, 2019 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. expandcollapse popup#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
SmileHe Posted July 11, 2019 Author Posted July 11, 2019 I found that is due to run as different user.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now