hangama Posted December 3, 2008 Posted December 3, 2008 Hi, I have gone through the forum, and found some answers which were supposed to solve my problem. I am a beginner, say 1 day old. I have one application which has this SysListView32 control showing stocks data. I would like to get those stock data. Attached is the snapshot of the application. I have this code with me. I am able to get the itemcount/rowcount and column count properly, but when I do getItemText, I get only blanks. #Include <WinAPI.au3> #Include <GuiListView.au3> local $handle, $var local $title, $classDetails $title = "ODIN Diet Client Ver 9.0.0.0 " $classDetails = "[CLASS:SysListView321; INSTANCE:1; ID:59648; CLASSNN:SysListView321]" $handle = WinGetHandle($title) local $listview, $header $listview = ControlGetHandle($title,"", $classDetails) $header = _GUICtrlListView_GetHeader($listview) local $rowcount $rowcount = _GUICtrlListView_GetItemCount($listview) local $columncount $columncount = _GUICtrlListView_GetColumnCount($listview) $var = ControlListView($title,"",$classDetails, "GetItemCount") MsgBox(0,"Item Count",$var) $var = ControlListView($title,"",$classDetails, "GetText",0,0) MsgBox(0,"",$var) Is my SubItem number correct. Kindly help me in clearing this. The details about the control. expandcollapse popup>>>> Window <<<< Title: ODIN Diet Client Ver 9.0.0.0 (Powered By FT-Engines) NSE EQ Id: F&O Id: 12595 Class: Afx:400000:8:10011:0:1b01c9 Position: -4, -4 Size: 1288, 746 Style: 0x15CF0000 ExStyle: 0x00000100 Handle: 0x000E0266 >>>> Control <<<< Class: SysListView32 Instance: 1 ClassnameNN: SysListView321 Advanced (Class): [CLASS:SysListView32; INSTANCE:1] ID: 59648 Text: Position: 2, 57 Size: 1280, 369 ControlClick Coords: 398, 144 Style: 0x5000040D ExStyle: 0x00000000 Handle: 0x0006023A >>>> Mouse <<<< Position: 400, 247 Cursor ID: 0 Color: 0xFF0000 >>>> StatusBar <<<< 1: >>>> Visible Text <<<< Market Watch - COMM Quantity is in Term of MCX:- Lots NSE E N N ND:Close >>>> Hidden Text <<<< NDXSpot Ticker Integrated Ticker Thanks
Zedna Posted December 3, 2008 Posted December 3, 2008 Try to use $classDetails = "SysListView321" There was some bug for situation you defined more informations in [] for control identification Resources UDF ResourcesEx UDF AutoIt Forum Search
pranksterguru Posted February 13, 2012 Posted February 13, 2012 ok. i know its a very old thread. but, i am also facing the same issue. i used the class type given by Zedna, but no use. GetItemCount works perfectly but GetText always returns null. please help !!
KaFu Posted February 13, 2012 Posted February 13, 2012 Maybe this remark from the help-file for ControlListView() applies to your situation? "Some commands may fail when using a 32-bit AutoIt process to read from a 64-bit process. Likewise commands may fail when using a 64-bit AutoIt process to read from a 32-bit process." OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
pranksterguru Posted February 13, 2012 Posted February 13, 2012 thanks for the quick reply.. my computer is 32 bit and my O/S and application is 32bit. i even tested this on my laptop which was born before 62bit existance. to give more background of this situation, i have tried to get the text of this listview using API programming and UI programming and reading application memory and i had the same problem!! i am now trying AutoIt as my friend suggested that this works on all application. do you think they are smart enough to control the data from being accessed from external application?
pranksterguru Posted February 13, 2012 Posted February 13, 2012 not sure if this will help you but here you go... information regarding the control i am trying to access. >>>> Window <<<< Title: Angel Diet Contact us : 33551111 Email: ebroking@angelbroking.com (Powered By FT-Engines) Class: Afx:00400000:8:00010003:00000000:4C3701F3 Position: -8, -8 Size: 1296, 1010 Style: 0x15CF0000 ExStyle: 0x00000100 Handle: 0x000F0398 >>>> Control <<<< Class: SysListView32 Instance: 1 ClassnameNN: SysListView321 Name: Advanced (Class): [CLASS:SysListView32; INSTANCE:1] ID: 59648 Text: Position: 10, 104 Size: 1264, 452 ControlClick Coords: 362, 182 Style: 0x5010040D ExStyle: 0x00000000 Handle: 0x00010642 >>>> Mouse <<<< Position: 372, 328 Cursor ID: 0 Color: 0x000000 >>>> StatusBar <<<< 1: >>>> ToolsBar <<<< >>>> Visible Text <<<< BANKNIFT - Market Watch Connection Toolbar NSE E N >>>> Hidden Text <<<< NDXSpot Ticker Condition Ticker Integrated Ticker Chart Line Toolbar CE N F CE attaching the actual control's picture..!!
Zedna Posted April 1, 2012 Posted April 1, 2012 Post your code ... Resources UDF ResourcesEx UDF AutoIt Forum Search
adityaparakh Posted August 13, 2019 Posted August 13, 2019 Bump ! Facing same issue. And same app ODIN Diet. Tried to compile both x86 - Data is blank. Header is displayed. Row Count and Column count are correct. x64 - Data is blank. Header is blank. Row Count and Column count are correct. expandcollapse popup#include <MsgBoxConstants.au3> #include <GUIListView.au3> #include <Array.au3> ;For demo purposes only #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> $hWnd = ControlGetHandle("ODIN DietClient Ver 10.0.5.0 (Powered by FT-Engines)","","SysListView322") $arr = _GUICtrlListView_GetContents($hWnd) ;=============================================================================== ; ; Function Name: _GUICtrlListView_GetContents ; Description:: Captures Contents of a SysListView32 Contrl Into an Array ; Parameter(s): $hWnd - Handle to the control ; Requirement(s): #include <GUIListView.au3> ; Return Value(s): Success - Array with ListView Contents ; Failure - 0 ; Author(s): Paul Wilson (spudw2k) ; ;=============================================================================== Func _GUICtrlListView_GetContents($hWnd) $iCol = _GUICtrlListView_GetColumnCount($hWnd) If $iCol = 0 Then Return 0 Dim $arrListView[1][$iCol] For $i = 0 to $iCol-1 Local $Col=_GUICtrlListView_GetColumn($hWnd,$i) $arrListView[0][$i]=$Col[5] Next $Col = 0 $iRows = _GUICtrlListView_GetItemCount($hWnd) For $i = 0 to $iRows-1 Redim $arrListView[UBound($arrListView)+1][$iCol] $arrListView[UBound($arrListView)-1][0]=_GUICtrlListView_GetItemText($hWnd,$i) For $j = 1 To $iCol-1 $arrListView[UBound($arrListView)-1][$j]=_GUICtrlListView_GetItemText($hWnd,$i,$j) Next Next Return $arrListView EndFunc ;==>_GUICtrlListView_GetContents _ArrayDisplay($arr)
Developers Jos Posted August 13, 2019 Developers Posted August 13, 2019 @adityaparakh, Could you stop being impatient and NOT Cross-post your question while you have your own topic already open? This is a very impolite and annoying behaviour! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
adityaparakh Posted August 13, 2019 Posted August 13, 2019 1 minute ago, Jos said: @adityaparakh, Could you stop being impatient and NOT Cross-post your question while you have your own topic already open? This is a very impolite and annoying behaviour! Jos Ok , Sorry about that. Been searching the forum. Thought it might be relevant and wanted to highlight it to members in this thread as well , as it was more specific to the issue. Please dont mind. Apologize if it violates the Forum decorum. Can you please help. I am trying with Simple Spy / UI Automation.
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