Yunguo Posted March 29, 2007 Posted March 29, 2007 Hi, All, I do not know whether anyone asked this question in this forum. I searched the forum, but I did not get any answer. I tried many times to resolve this problem, but the script did not work out. Here is the question: Say, I have 10 items listed in a combox, I would like use autoit script to select the item in the combox one by one: first to 10th. How to do that? Thanks a lot! YY
Teldin Posted March 29, 2007 Posted March 29, 2007 (edited) $data = GUICtrlCreateCombo("Choose Something", 20, 265, 230, 30) GUICtrlSetData($data, "data1|data2|data3|data4|data5|data6|data7|data8|data9|data10") Case GUICtrlRead($data) = "data1" $something = 1 Case GUICtrlRead($data) = "data2" $something = 2 Case GUICtrlRead($data) = "data3" $something = 3 Case GUICtrlRead($data) = "data4" $something = 4 Case GUICtrlRead($data) = "data5" $something = 5 Case GUICtrlRead($data) = "data6" $$something = 6 Case GUICtrlRead($data) = "data7" $something = 7 Case GUICtrlRead($data) = "data8" $something = 8 Case GUICtrlRead($data) = "data9" $$something = 9 Case GUICtrlRead($data) = "data10" $something = 10 Is this what you mean? Credit goes to whomever (I forget) answered it for me when I asked. Edited March 29, 2007 by Teldin
xcal Posted March 29, 2007 Posted March 29, 2007 Run _GUICtrlComboSetCurSel through a loop. How To Ask Questions The Smart Way
Yunguo Posted March 29, 2007 Author Posted March 29, 2007 Hi, Teldin, Thanks a lot for the reply. However, this may not be precisely what I need. I guess I was not clear in my post. I have a program with a Combox. In the Combox, there is a list of options. What I would to do is to use autoit script select one and do a task, then select second, do a the tast again, ... till finish all list item. Any idea? Thanks a lot in advance! YY
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