JPLackman Posted October 17, 2006 Posted October 17, 2006 Have been trying to get the number of items in a combo box, without much success (am a newb). Here is where I have gone so far. Doesn't look like the include do anything if not using a gui and the msgbox is just to see the results. Ultimately I want to be able to cycle through the contents of the combo box and based on the selection perform some actions or move to the next item. If I use GetSelection I get the first letter of my current selection so I know that I am getting to the control. #include <ComboConstants.au3> #include <ListBoxConstants.au3> #region --- ScriptWriter generated code Start --- Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("SQL Query Analyzer","") If Not WinActive("SQL Query Analyzer","") Then WinActivate("SQL Query Analyzer","") WinWaitActive("SQL Query Analyzer","") ControlFocus("SQL Query Analyzer","","ComboBox2") $ComboItems = ControlCommand("SQL Query Analyzer","","ComboBox2", "GetCount") MsgBox(0, "Combo Items", "Number of Items = " & $ComboItems) #endregion --- ScriptWriter generated code End ---
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