Sign in to follow this  
Followers 0

Combo box

1 post in this topic

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 ---





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 ---

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0