Sign in to follow this  
Followers 0
perdurabo

SysListView get data from external app

3 posts in this topic

#1 ·  Posted (edited)

Hello

Ps. please move this post to right place, and sorry for my mistake

I start with AutoIt and I stuck on get data string from external app.

btw. sorry for my bad english

AutoIt Window Info show me this information:

>>>> Window <<<<

Title: informacja

Class: #32770

Position: 0, 32

Size: 1024, 674

Style: 0x94C808C5

ExStyle: 0x00010501

Handle: 0x001708AE

>>>> Control <<<<

Class: SysListView32

Instance: 1

ClassnameNN: SysListView321

Advanced (Class): [CLASS:SysListView32; INSTANCE:1]

ID: 3005

Text: List1

Position: 4, 57

Size: 1010, 389

ControlClick Coords: 288, 43

Style: 0x50019401

ExStyle: 0x00000204

Handle: 0x001608AC

>>>> Mouse <<<<

Position: 295, 154

Cursor ID: 0

Color: 0xEAEDF6

i try to use script which I found on this forum with no success:

If WinExists("[CLASS:#32770; TITLE:informacja]") Then

$hWin = WinGetHandle("[CLASS:#32770; TITLE:informacja]")

$hLB = ControlGetHandle($hWin, "", "[CLASS:SysListView32; INSTANCE:1]")

$iLBCount = _GUICtrlListBox_GetCount($hLB)

$sLBList = "ListBox item texts:" & @CRLF

For $i = 0 To $iLBCount - 1

$sLBList &= _GUICtrlListBox_GetText($hLB, $i)

Next

MsgBox(64, "ListBox Data", $sLBList)

Else

MsgBox(16, "Error", "Window is not present.")

EndIf

thanks for any help

Edited by perdurabo

Share this post


Link to post
Share on other sites



Hello

Ps. please move this post to right place, and sorry for my mistake

I start with AutoIt and I stuck on get data string from external app.

btw. sorry for my bad english

AutoIt Window Info show me this information:

>>>> Window <<<<

Title: informacja

Class: #32770

Position: 0, 32

Size: 1024, 674

Style: 0x94C808C5

ExStyle: 0x00010501

Handle: 0x001708AE

>>>> Control <<<<

Class: SysListView32

Instance: 1

ClassnameNN: SysListView321

Advanced (Class): [CLASS:SysListView32; INSTANCE:1]

ID: 3005

Text: List1

Position: 4, 57

Size: 1010, 389

ControlClick Coords: 288, 43

Style: 0x50019401

ExStyle: 0x00000204

Handle: 0x001608AC

>>>> Mouse <<<<

Position: 295, 154

Cursor ID: 0

Color: 0xEAEDF6

i try to use script which I found on this forum with no success:

If WinExists("[CLASS:#32770; TITLE:informacja]") Then

$hWin = WinGetHandle("[CLASS:#32770; TITLE:informacja]")

$hLB = ControlGetHandle($hWin, "", "[CLASS:SysListView32; INSTANCE:1]")

$iLBCount = _GUICtrlListBox_GetCount($hLB)

$sLBList = "ListBox item texts:" & @CRLF

For $i = 0 To $iLBCount - 1

$sLBList &= _GUICtrlListBox_GetText($hLB, $i)

Next

MsgBox(64, "ListBox Data", $sLBList)

Else

MsgBox(16, "Error", "Window is not present.")

EndIf

thanks for any help

Why you use functions intended for ListBox? See in the help file:

ControlListView() and GuiListView Management.

Share this post


Link to post
Share on other sites

thank you, now i know, i use wrong function (stupid!) :P

i use _GUICtrlListView_GetItemCount & _GUICtrlListView_GetItemText and now it work fine and I can go to the next level with my small script, thanks again

Share this post


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
Sign in to follow this  
Followers 0