Jump to content

Recommended Posts

Posted

Hey Guys,

I am currently trying to read the text out of the following list

Posted Image

ControlGetText won't work and I've searched over 2 hours to find an alternative, now I am asking you guys :)

Here is the Window Info

>>>> Window <<<<
Title:  PokerStars Lobby
Class:  #32770
Position:   130, 36
Size:   1118, 742
Style:  0x94CF0004
ExStyle:    0x00010100
Handle: 0x00000000000A0258

>>>> Control <<<<
Class:  PokerStarsListClass
Instance:   1
ClassnameNN:    PokerStarsListClass1
Name:   
Advanced (Class):   [CLASS:PokerStarsListClass; INSTANCE:1]
ID: 
Text:   
Position:   9, 201
Size:   759, 369
ControlClick Coords:    494, 124
Style:  0x54010000
ExStyle:    0x00000000
Handle: 0x000000000014031C

>>>> Mouse <<<<
Position:   637, 403
Cursor ID:  0
Color:  0xF7F7F7

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<


>>>> Hidden Text <<<<
Posted

Maybe ControlListView will Help you!

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

ControlListView("PokerStars Lobby", "", "PokerStarsListClass1", "SelectAll")
$Test = ControlListView("PokerStars Lobby", "", "PokerStarsListClass1", "GetSelected")
MsgBox(0, "", $Test)

I guess this is completly wrong, since its not working at all :) It returns ""

How would I do it with ControlListView?

Posted (edited)

I have never used ControlListView() but reading the Help File I would guess...

$ItemCount = ControlListView("PokerStars Lobby", "", "[CLASS:PokerStarsListClass; INSTANCE:1]", "GetItemCount")
For $i = 0 To $ItemCount - 1
    ConsoleWrite(ControlListView("PokerStars Lobby", "", "[CLASS:PokerStarsListClass; INSTANCE:1]", "GetText", $i) & @CRLF)
Next
; This should show in the SciTE Console the First Item e.g. Capek XXII...
Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  Quote

Ain't working, anyone else got an idea how to get this text in any way?

Maybe have a look through the Forum using ControlListView as the subject? I found this >>

I have kindly taken the code PSaltyDS created and changed it to the details you provided:

#include <GuiListView.au3>

; ...

$hWindow = WinGetHandle("PokerStars Lobby", "") ; 
$hListView = ControlGetHandle($hWindow, "", "[CLASS:PokerStarsListClass; INSTANCE:1]")
$iItemCnt = _GUICtrlListView_GetItemCount($hListView)
$iColCnt = _GUICtrlListView_GetColumnCount($hListView)
For $i = 0 To $iItemCnt - 1
    ConsoleWrite("Item: " & $i & @LF)
    For $c = 0 To $iColCnt - 1
        $sText = _GUICtrlListView_GetItemText($hListView, $i, $c)
        ConsoleWrite(@TAB & "Col: " & $c & " = " & $sText & @LF)
    Next
Next
Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  Quote

>>>> Control <<<<

Class:  PokerStarsListClass

Instance:   1

ClassnameNN:    PokerStarsListClass1

It's custom control.

Autoit can communicate only with standard Windows controls.

So I expect there are only three possible ways (all difficult):

- memory read

- OCR

- using (sending/catching) some windows messages (WM_COMMAND) in target application

Edited by Zedna
Posted

Ty so much for your afford guinness!

I see Zedna, guess I'll read myself through catching windows messages and give it a try!

  • 7 years later...

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