Sign in to follow this  
Followers 0
ELM

Combo Box Control

3 posts in this topic

The script I'm currently working on requires me to check to see if an option is available in a combobox. I can detect this by either checking for the string or by getting the number of items in the combobox because it will be less if the option is not there.

I have tried to use various CommandControl calls to do this without success. Is there any way to find out if an exact string DOESN'T exist in a combobox or to get the number of items in a combo box? I may be simply using the CommandControl functions incorrectly. Thanks in advance.

Share this post


Link to post
Share on other sites



The script I'm currently working on requires me to check to see if an option is available in a combobox. I can detect this by either checking for the string or by getting the number of items in the combobox because it will be less if the option is not there.

I have tried to use various CommandControl calls to do this without success. Is there any way to find out if an exact string DOESN'T exist in a combobox or to get the number of items in a combo box? I may be simply using the CommandControl functions incorrectly. Thanks in advance.

Hi... and welcome to the forum, you'll find when you provide now code and no program to test in, that all you'll get are assumptions or educated guesses at best.

I'll start the educated guess off... It's ControlCommand .... not CommandControl


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

I can't post code because the code does not exist. I'm simply looking to write some error detecting code that will be embedded very deep within a rather large script I wrote a few months ago. Posting just a part of this code would be useless and the entire thing is very long. I apologize for miss spelling the name of the function, it has been about two months since I put this project down and switched to other languages so function names aren't very fresh in my mind. Anyway, what I can do is try to explain what this particular part of the program should do.

The configuration for my wireless network isn't exactly the simpliest thing to set up, so I wrote a script to set up the windows utility for me. The script itself works perfectly, the only problem is if it is run on a network card that does not support 802.1x, it will complete but not set up the network correctly because it can not do so. Basically, I need error detection for the people that are too lazy to make sure their card is supported. The easiest way to detect this error would be to check if "WPA" exists in one of the combo boxes in the properties of a wireless network. This is all I need to do for this program to work exactly as I would like it to. I didn't realize I needed to post a program or code for such a general control interaction question, I'm new =P.

If it helps, the combo box that I am referring to can be reached by doing the following in Windows XP:

Network Connections > Wireless Network Connection > Properties > Wireless Networks Tab > Add. There will be combo box for Network Authentication. For the script to work, "WPA" must be an option in the box. There should be four options, Open, Shared, WPA, and WPA-PSK. If an error should be thrown, WPA will not be there and there will be less than four options in the combo box. I am looking for a way to detect either the number of options or the lack of the WPA option. Once again, I have tried using the ControlCommand variations without much luck. My real question is, can either of these things be detected with Autoit and I just missed the functions to do so? I've been over the control section of the help file way too many times. Any help would be greatly appreciated.

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