Kirky Posted May 2, 2017 Share Posted May 2, 2017 Please be gentle, I am new to this. I am trying to automate the installation of a vendors application that can not be installed silently in the usual way (msi etc) so I am using AutoIT for the first time. I have managed to use the AutoIT Windows Info to get most of the information I require when the answer is mainly next, Yes, enter etc. However I am now stuck. I need to highlight an item on a list (AutoIT Windows info tells me it's a ListBox) but I can't find the correct function in order to do this. It seems to have sprung from really simple to really complicated. Could anyone explain how to do this is really simple terms? Please and thank you. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 2, 2017 Moderators Share Posted May 2, 2017 @Kirky welcome to the forum. Can you please post the information from the Window Info Tool for the listbox? I am guessing it will be a combination of ControlGetHandle and _GUICtrlListBox_ClickItem, but the window info tool will help immensely. Kirky 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Kirky Posted May 2, 2017 Author Share Posted May 2, 2017 Thanks for the quick reply, here is the summary: Auto_listBox_Summary.txt Link to comment Share on other sites More sharing options...
Kirky Posted May 2, 2017 Author Share Posted May 2, 2017 I want to select and highlight the 1st item on the list and then select OK. Link to comment Share on other sites More sharing options...
jdelaney Posted May 3, 2017 Share Posted May 3, 2017 WinGetHandle ControlGetHandle ControlCommand using this option: "SelectString", 'string' IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Kirky Posted May 4, 2017 Author Share Posted May 4, 2017 Hi Jdelaney, thanks for your reply, are there any tutorials or sample scripts on how to use the options you have stated above? Thanks Link to comment Share on other sites More sharing options...
Kirky Posted May 4, 2017 Author Share Posted May 4, 2017 I've found some examples thanks. I will give it a try and let you know how I get on. Link to comment Share on other sites More sharing options...
Kirky Posted May 4, 2017 Author Share Posted May 4, 2017 I'm really sorry to sound stupid but scripting is new to me and so even though you have kindly given me some pointers jdelaney I still can't work out what to do!!! Please could you possibly write what you have suggested in to a small script which shows me how to use the functions you suggested and I can then replace the values with those that are relevant to my project? Link to comment Share on other sites More sharing options...
Floops Posted May 4, 2017 Share Posted May 4, 2017 Does this work? $hWindow = WinGetHandle("Select AutoCAD") $hControl = ControlGetHandle($hWindow, "", "[CLASS:ListBox; INSTANCE:1]") ControlCommand($hWindow, "", $hControl, "SelectString", "Text of the item you want selected") ; Change this Kirky 1 Link to comment Share on other sites More sharing options...
Kirky Posted May 4, 2017 Author Share Posted May 4, 2017 Floops you are an absolute legend, thank you so much for sparing yourtime to help me, that worked perfectly. I guess I will get more used to the functions the more I use it. Thanks again. Floops 1 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