System Tester Posted July 14, 2015 Share Posted July 14, 2015 Hi Guys, I'm a Noob trying to create test scripts using AutoIt. I want to read a 5x12 tableOutput from the Window info tool...>>>> Window <<<<Title: CorrectionClass: #32770Position: 774, 182Size: 1014, 646Style: 0x94C000CCExStyle: 0x00050101Handle: 0x00000000002C06A8>>>> Control <<<<Class: SysListView32Instance: 1ClassnameNN: SysListView321Name: Advanced (Class): [CLASS:SysListView32; INSTANCE:1]ID: 1002Text: List2Position: 287, 240Size: 687, 112ControlClick Coords: 141, 54Style: 0x50218001ExStyle: 0x00000204Handle: 0x000000000023020C>>>> Mouse <<<<Position: 1210, 511Cursor ID: 0Color: 0xFFFFFF>>>> StatusBar <<<<>>>> ToolsBar <<<<>>>> Visible Text <<<<&Modify&Clear&QuitR&efreshF&ilterFilter Type :PCDFilter Value :888886&1 Counting CorrectionC&urrent&Key-InMachine C&ount&RejectF1 NotesF2 CoinF3 OtherF12 AllF4 NumberF5 AmountF6 Package 3F7 Package 2F8 Package 1F9 GenuineRo&ll UpList2F10 FalseList4Counterfei&tF11 OtherList6888886_000000000235_026_100715Reference :Denomination TypeTotal :20.00Total :0.00Total :0.00Key-In ModeTotal DisplayCounter OnlineClient :1ST National Bank15000.000.0020.00>>>> Hidden Text <<<<&SearchC&hequesOKCancelHelp----------------------------------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. Link to comment Share on other sites More sharing options...
System Tester Posted July 14, 2015 Author Share Posted July 14, 2015 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=1While $i < $itemcountMsgBox($MB_SYSTEMMODAL, $i, ControlListView("Correction","","SysListView321","GetText",$i,4))$i=$i+1WEnd The AutoIt help file should be interrogated.The Editor should be SciTe.The forums should have been searched. Link to comment Share on other sites More sharing options...
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