Jump to content

Yet Again SysListView32 issue


Recommended Posts

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.

>>>> 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

post-43567-1228332064_thumb.jpg

Link to post
Share on other sites
  • 3 years later...

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."

Link to post
Share on other sites

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?

Link to post
Share on other sites

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..!!

post-70300-0-30723100-1329173044_thumb.j

Link to post
Share on other sites
  • 1 month later...
  • 7 years later...

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.
 

#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)

 

ODIN Au3 Info 2.png

ODIN Au3 Info 3.png

ODIN Au3 Info.png

Link to post
Share on other sites
  • Developers

@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.
  :)

Link to post
Share on other sites
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.

 

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...