tom77757 Posted April 27, 2007 Posted April 27, 2007 Im newbie when it comes to Autoit scripting. Im trying to select an item from a combobox list. How would do that? This is what I tried. ControlClick Test "", 1006,"ComboBox1") ControlCommand ( "Test", 1006, "ShowDropDown") ControlCommand ( "Test", "", 1006, "SetCurrentSelection",Static3) Thanks, Tom
Zedna Posted April 27, 2007 Posted April 27, 2007 $i = ControlCommand("Test","",'ComboBox1', 'FindString', 'Your text to select') ControlCommand ( "Test", "", "ComboBox1", "SetCurrentSelection",$i) Resources UDF ResourcesEx UDF AutoIt Forum Search
tom77757 Posted April 27, 2007 Author Posted April 27, 2007 Hi Zedna, I tried what you have suggested and still it didn't work, Do you know why? I added a message box to see the string and it returned 0. ControlClick("test", "", 9,"ThunderRT6ComboBox1") $i = ControlCommand("Test","",'ThunderRT6ComboBox1', 'FindString', 'ORADBC1') ControlCommand ( "Test", "", "ThunderRT6ComboBox1", "SetCurrentSelection",$i) MsgBox(0,"test",$i) Thanks, Tom
Zedna Posted April 27, 2007 Posted April 27, 2007 Problem is in ThunderRT6ComboBox1. This mean it's not a standard ComboBox control and ControlCommand doesn't not work with non standard controls. So use Send() or ControlSend() Resources UDF ResourcesEx UDF AutoIt Forum Search
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