Art Posted March 4, 2009 Share Posted March 4, 2009 I'm trying to select an item in a drop down list in an existing (non-AutoIt) application. Using the AutoIt Info tool, I was able to get the information for the combo box and the items in the list. I've tried to do it with the lines below. The "ShowDropDown" command works correctly - the list appears. But when I try to select an item in the list ("1280 x 720") with the second command nothing happens. The item in the list highlighted is the first in the list, not the 1280 x 720 and there is no selection of the 1280 x 720 item. Can someone tell me how to select an item in the list. Thanks, Art ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "ShowDropDown") ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboLBox;INSTANCE:1]", "SelectString", '1280 x 720') Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 4, 2009 Share Posted March 4, 2009 (edited) I'm trying to select an item in a drop down list in an existing (non-AutoIt) application. Using the AutoIt Info tool, I was able to get the information for the combo box and the items in the list. I've tried to do it with the lines below. The "ShowDropDown" command works correctly - the list appears. But when I try to select an item in the list ("1280 x 720") with the second command nothing happens. The item in the list highlighted is the first in the list, not the 1280 x 720 and there is no selection of the 1280 x 720 item. Can someone tell me how to select an item in the list. Thanks, Art ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "ShowDropDown") ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboLBox;INSTANCE:1]", "SelectString", '1280 x 720') In the first you use "[CLASS:ComboBox;INSTANCE:7]", and in the second you use "[CLASS:ComboLBox;INSTANCE:1]"... why? Edited March 4, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Art Posted March 4, 2009 Author Share Posted March 4, 2009 In the first you use "[CLASS:ComboBox;INSTANCE:7]", and in the second you use "[CLASS:ComboLBox;INSTANCE:1]"... why? Originally, when I placed the AutoIt Info tool over the control before it is clicked, the tool says it's a ComboBox. When I click on the control and the list drops down, if I put the Info tool over the 1280 x 720 selection, the tool says it's ComboLBox. I changed the first ControlCommand to ComboLBox Instance 1, the control never gets clicked and the list doesn't drop down. Any ideas? Thanks, Art Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 4, 2009 Share Posted March 4, 2009 Originally, when I placed the AutoIt Info tool over the control before it is clicked, the tool says it's a ComboBox. When I click on the control and the list drops down, if I put the Info tool over the 1280 x 720 selection, the tool says it's ComboLBox. I changed the first ControlCommand to ComboLBox Instance 1, the control never gets clicked and the list doesn't drop down. Any ideas? Thanks, Art Did you try the other way around? ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "SelectString", '1280 x 720') Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Art Posted March 4, 2009 Author Share Posted March 4, 2009 Did you try the other way around? ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "SelectString", '1280 x 720') This single line doesn't work: ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "SelectString", '1280 x 720') However, these two lines do work: ControlCommand("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "ShowDropDown") ControlSend("Intel® Graphics Media Accelerator Driver for Mobile", "", "[CLASS:ComboBox;INSTANCE:7]", "1280 x 720") So, in the interest of time, I'm done with this issue. Thanks again, Art Link to comment Share on other sites More sharing options...
KaFu Posted March 4, 2009 Share Posted March 4, 2009 Are you trying to switch screen resolution? If so, maybe better try something like this:#650356If not... ignore post ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) 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