Sign in to follow this  
Followers 0
faldo

Array help

2 posts in this topic

I've got a little problem to which there is a solution i know alot of you take for granted.

I want to make a GUI with checkboxes but ran into a small problem that i THINK can be solved by making an array of some kind... i'm really bad with arrays and hope to be able to studdy the result from whoever help me with this...

So lets say i have a gui and want to add 10 checkboxes to it. Now, with 10 checkboxes there is a possible combination of 10^10 combinations right? (correct me if i'm wrong, was never good at math either ;) ). If checkbox nr 3 and 5 are checked i need the script to give me a variable with 8. If 3, 5 and 8 are checked i need the variable to return 16.

Instead of typeing out all the different possible combinations with lots of "IFs" i'm hopeing this can be solved with an array?

Share this post


Link to post
Share on other sites



Might want to look at this post http://www.autoitscript.com/forum/index.ph...841entry71841

you would just have to add $i if the statement is true, meaning

if $CheckBox[$i] is checked add $i to variable


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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