bdwilcox Posted June 7, 2016 Share Posted June 7, 2016 In HP driver installs I have the below window that lists all found printers. I want AutoIt to click on a line if it finds the correct MAC address and then click the Next button. User "orbs" graciously pointed me to the ControlListView command to do this but I have found the documentation on this command a bit lacking and need some clarification. In trying to experiment with the command, it seems like I almost need nested ControlListView commands to feed the result of the FindItem control to the Select control like so: ControlListView ( "HP Officejet Pro 8600", "", 2001, "Select", ControlListView ( "HP Officejet Pro 8600", "", 2001, "FindItem", "8851FB150E26",3)) Tried this in my script and it didn't work...and it crashed the HP installer. So... 1) What does the last field in FindItem declare as it isn't documented well? The documentation says SubItem, which the documentation also declares to be a column value, so does this allow you to tell the FindItem control to only look in a certain column in the table ? (In my above example I put a 3 as I want it to look in column 3, the MAC address column) 2) For the Select control it has two parameters called From and To; are these numerical markers for the table grid or are they text strings? How do I declare what item for the Select command to, er, select? Just a little lost on the syntax here as the documentation is a bit...vague. Link to comment Share on other sites More sharing options...
orbs Posted June 8, 2016 Share Posted June 8, 2016 (edited) @bdwilcox, i've never used ControlListView before, so here is what i did: opened the example for GuiCtrlCreateListView(), compiled it to exe, run it. now i have a well-known GUI with a listview that i can work with: then i used this command: ControlListView('listview items', '', 'SysListView321', 'Select', 1) the result: the index for the Select command is zero-based, i.e. index 0 means the 1st item, index 1 is the 2nd item. the index for subitem is also zero-based. "item" means row, "subitem" means column. this is mentioned in the help for ControlListView(). read the help carefully, and you are ready to take it from here. Edited June 8, 2016 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff 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