Jump to content

Recommended Posts

Posted

Hi Guys, I'm a Noob trying to create test scripts using AutoIt. I want to read a 5x12 table

Output from the Window info tool...

>>>> Window <<<<
Title: Correction
Class: #32770
Position: 774, 182
Size: 1014, 646
Style: 0x94C000CC
ExStyle: 0x00050101
Handle: 0x00000000002C06A8

>>>> Control <<<<
Class: SysListView32
Instance: 1
ClassnameNN: SysListView321
Name: 
Advanced (Class): [CLASS:SysListView32; INSTANCE:1]
ID: 1002
Text: List2
Position: 287, 240
Size: 687, 112
ControlClick Coords: 141, 54
Style: 0x50218001
ExStyle: 0x00000204
Handle: 0x000000000023020C

>>>> Mouse <<<<
Position: 1210, 511
Cursor ID: 0
Color: 0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
&Modify
&Clear
&Quit
R&efresh
F&ilter
Filter Type :
PCD
Filter Value :
888886
&1 Counting Correction
C&urrent
&Key-In
Machine C&ount
&Reject
F1 Notes
F2 Coin
F3 Other
F12 All
F4 Number
F5  Amount
F6 Package 3
F7 Package 2
F8 Package 1
F9 Genuine
Ro&ll Up
List2
F10 False
List4
Counterfei&t
F11 Other
List6
888886_000000000235_026_100715
Reference :
Denomination Type
Total :
20.00
Total :
0.00
Total :
0.00
Key-In Mode
Total Display
Counter Online
Client :
1ST National Bank
15
0
0
0.00
0.00
20.00


>>>> Hidden Text <<<<
&Search
C&heques
OK
Cancel
Help

----------------------------------

My code.

ControlListView("Correction","","SysListView321","SelectAll")
MsgBox($MB_SYSTEMMODAL, "", ControlListView("Correction","","SysListView321","GetSelected",1))

results in "0|1|2|3|4|5|6|7|8|9|10|11" being displayed

-----------------------------------

What am I doing wrong?

The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched.

Posted

OK! solved.

"GetSelected" [, option]Returns a string containing the item index of selected items.

So, to look at Column 4..

ControlListView("Correction","","SysListView321","SelectAll")
$itemcount = ControlListView("Correction","","SysListView321","GetItemCount")

$i=1
While $i < $itemcount
MsgBox($MB_SYSTEMMODAL, $i, ControlListView("Correction","","SysListView321","GetText",$i,4))
$i=$i+1
WEnd

 

The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched.

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