Petzl Posted December 11, 2010 Share Posted December 11, 2010 I am a novice with AutoIT. I want to be able to select a value from a dropdown in a program I use via a button. I used AutoIT Window info to get the following: Basic Window Info Class: WindowsForms10.window.8.app.0.2004eee Basic Control Info Class: WindowsForms10.COMBOBOX.app.0.2004eee There are about 20 dropdown items and I want the 4th on the list. Do I need to provide any further info and can anyone help? Thanks very much. Petzl. Link to comment Share on other sites More sharing options...
Realm Posted December 11, 2010 Share Posted December 11, 2010 Petzl, Have you tried ControlCommand? Go Back to Window Info Tool, use the finder tool to identify the control/combo box you wish to automate. Change these following settings with the information you get: controlID = ClassnameNN string = with the text you wish to select. ControlCommand('[CLASS:WindowsForms10.window.8.app.0.2004eee]','','controlID',"SelectString", 'string') Or ControlCommand('[CLASS:WindowsForms10.window.8.app.0.2004eee]','','controlID',"SetCurrentSelection", 4) Realm PS. You can change '[CLASS:WindowsForms10.window.8.app.0.2004eee]' with the actual title of the window as well. My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
Petzl Posted December 11, 2010 Author Share Posted December 11, 2010 Hey Realm, Thanks for the reply. There is no window that pops up so that is not an option. It is just a dropdown on the menu of the program. So I should have: ControlCommand('[CLASS:WindowsForms10.window.8.app.0.2004eee]','','WindowsForms10.COMBOBOX.app.0.2004eee3',"SelectString", 'ACTDemo') or: ControlCommand('[CLASS:WindowsForms10.window.8.app.0.2004eee]','','WindowsForms10.COMBOBOX.app.0.2004eee3',"SetCurrentSelection", 4) Correct? AutoInfo is below. I have tried both and nothing is happening...... Class: WindowsForms10.COMBOBOX.app.0.2004eee Instance: 3 ClassnameNN: WindowsForms10.COMBOBOX.app.0.2004eee3 Name: Advanced (Class): [CLASS:WindowsForms10.COMBOBOX.app.0.2004eee; INSTANCE:3] ID: 461500 Link to comment Share on other sites More sharing options...
Realm Posted December 11, 2010 Share Posted December 11, 2010 Petzl, If that don't work try changing 'WindowsForms10.COMBOBOX.app.0.2004eee3' to '[CLASS:WindowsForms10.COMBOBOX.app.0.2004eee; INSTANCE:3]'. Not sure if that will make a difference. Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 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