Jump to content

Case structure for any array item of checkboxes


Recommended Posts

I'd like to do :

Case $msg = $array[all]

is there any way to do such a thing?

bascially i have a bunch of checkboxes set up as an array and i want it so that whenever i check or uncheck this box it'll disable/enable a control.

I cant think of any way to do this but brute force.

Thanks

Link to comment
Share on other sites

A loop that uses GuiGetMsg to retrieve messages from the Gui.

Only problem that you may incur for testing a large array in a constant loop is CPU usage perhaps being high, but that can be judged upon testing the script.

Edit:

An example

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = -3
            Exit
        Case $msg = <= 0
            ContinueLoop
    EndSelect
    For $i = 0 To UBound($array)-1
        If $msg = $array[$i] Then
            ; do the action
        EndIf
    Next
WEnd
Edited by MHz
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...