Jump to content

Array help


faldo
 Share

Recommended Posts

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?

Link to comment
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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...